# Generated by Django 3.1.5 on 2021-02-01 14:40

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

import jsonfield.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Image",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=50)),
                (
                    "image",
                    models.ImageField(upload_to="images/%Y/%m/%d"),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Contact",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("first_name", models.CharField(max_length=50)),
                ("last_name", models.CharField(max_length=50)),
                (
                    "phone_number",
                    models.CharField(max_length=20, null=True),
                ),
                ("notes", jsonfield.fields.JSONField(null=True)),
                (
                    "icon",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="icon_contacts",
                        to="contacts.image",
                    ),
                ),
                (
                    "photos",
                    models.ManyToManyField(to="contacts.Image"),
                ),
            ],
            options={
                "ordering": ["last_name"],
            },
        ),
    ]

# Generated by Django 3.1.5 on 2021-02-01 14:40

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

import jsonfield.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Image",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=50)),
                (
                    "image",
                    models.ImageField(upload_to="images/%Y/%m/%d"),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Contact",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("first_name", models.CharField(max_length=50)),
                ("last_name", models.CharField(max_length=50)),
                (
                    "phone_number",
                    models.CharField(max_length=20, null=True),
                ),
                ("notes", jsonfield.fields.JSONField(null=True)),
                (
                    "icon",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="icon_contacts",
                        to="contacts.image",
                    ),
                ),
                (
                    "photos",
                    models.ManyToManyField(to="contacts.Image"),
                ),
            ],
            options={
                "ordering": ["last_name"],
            },
        ),
    ]

# Generated by Django 3.1.5 on 2021-02-01 14:40