# Generated by Django 3.2 on 2021-05-09 07:52

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Source",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=200, verbose_name="name")),
            ],
        ),
        migrations.CreateModel(
            name="Article",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("author", models.CharField(max_length=250, verbose_name="author")),
                ("title", models.CharField(max_length=300, verbose_name="title")),
                ("url", models.URLField(max_length=300, verbose_name="url")),
                (
                    "url_to_image",
                    models.URLField(max_length=300, verbose_name="image url"),
                ),
                ("published_at", models.DateTimeField(verbose_name="published at")),
                ("content", models.TextField(verbose_name="content")),
                (
                    "source",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="related_article",
                        to="news.source",
                    ),
                ),
            ],
        ),
    ]

# Generated by Django 3.2 on 2021-05-09 07:52

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Source",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=200, verbose_name="name")),
            ],
        ),
        migrations.CreateModel(
            name="Article",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("author", models.CharField(max_length=250, verbose_name="author")),
                ("title", models.CharField(max_length=300, verbose_name="title")),
                ("url", models.URLField(max_length=300, verbose_name="url")),
                (
                    "url_to_image",
                    models.URLField(max_length=300, verbose_name="image url"),
                ),
                ("published_at", models.DateTimeField(verbose_name="published at")),
                ("content", models.TextField(verbose_name="content")),
                (
                    "source",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="related_article",
                        to="news.source",
                    ),
                ),
            ],
        ),
    ]

# Generated by Django 3.2 on 2021-05-09 07:52