# Generated by Django 2.2 on 2019-07-14 10:36

import django.db.models.deletion
import django.utils.timezone

from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("collection", "0001_initial"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="Post",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(default=django.utils.timezone.now)),
                ("modified", models.DateTimeField(auto_now=True)),
                ("title", models.CharField(blank=True, max_length=200, null=True)),
                ("body", models.TextField(blank=True, null=True)),
                ("author", models.CharField(blank=True, max_length=40, null=True)),
                ("publication_date", models.DateTimeField(blank=True, null=True)),
                ("url", models.URLField(blank=True, max_length=1024, null=True)),
                (
                    "remote_identifier",
                    models.CharField(
                        blank=True, editable=False, max_length=500, null=True
                    ),
                ),
                (
                    "rule",
                    models.ForeignKey(
                        editable=False,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="collection.CollectionRule",
                    ),
                ),
            ],
            options={"abstract": False},
        ),
        migrations.CreateModel(
            name="Category",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(default=django.utils.timezone.now)),
                ("modified", models.DateTimeField(auto_now=True)),
                ("name", models.CharField(max_length=50, unique=True)),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=models.CASCADE, to=settings.AUTH_USER_MODEL
                    ),
                ),
            ],
            options={"verbose_name": "Category", "verbose_name_plural": "Categories"},
        ),
    ]
