# Generated by Django 3.0.10 on 2020-09-17 11:01

import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Publication",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("modified", models.DateTimeField(auto_now=True)),
                (
                    "doi",
                    models.CharField(
                        help_text="The DOI, e.g., 10.1002/mrm.25227, or the arXiv id, e.g., 2006.12449",
                        max_length=255,
                        unique=True,
                        validators=[
                            django.core.validators.RegexValidator(
                                regex="^10\\.\\d{4,9}/[-._;()/:a-z0-9]+$|^\\d{4}\\.\\d{4,5}$",
                            )
                        ],
                    ),
                ),
                (
                    "citeproc_json",
                    django.contrib.postgres.fields.jsonb.JSONField(
                        editable=False
                    ),
                ),
                ("title", models.TextField(editable=False)),
                (
                    "referenced_by_count",
                    models.PositiveIntegerField(editable=False, null=True),
                ),
                (
                    "year",
                    models.PositiveIntegerField(editable=False, null=True),
                ),
            ],
        ),
    ]
