# Generated by Django 3.0.5 on 2020-12-20 12:36

from django.db import migrations, models
from faker import Faker

count = 100


def add_articles(apps, schema_editor):
    fake = Faker()
    Faker.seed(0)
    model = apps.get_model('magazine', 'Article')
    for _ in range(count):
        model.objects.create(
            title=fake.name().split()[0],
            text=fake.text()[:256]
        )


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('text', models.CharField(max_length=1024)),
            ],
        ),
        migrations.RunPython(add_articles, reverse_code=None)
    ]

# Generated by Django 3.0.5 on 2020-12-20 12:36

from django.db import migrations, models
from faker import Faker

count = 100


def add_articles(apps, schema_editor):
    fake = Faker()
    Faker.seed(0)
    model = apps.get_model('magazine', 'Article')
    for _ in range(count):
        model.objects.create(
            title=fake.name().split()[0],
            text=fake.text()[:256]
        )


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('text', models.CharField(max_length=1024)),
            ],
        ),
        migrations.RunPython(add_articles, reverse_code=None)
    ]

# Generated by Django 3.0.5 on 2020-12-20 12:36