# Generated by Django 2.1.4 on 2018-12-22 15:44

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import find.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Missing_person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('nickname', models.CharField(max_length=20, null=True)),
                ('birthday', models.DateField()),
                ('missing_place', models.CharField(max_length=100)),
                ('missing_time', models.DateField()),
                ('status', models.CharField(max_length=20)),
                ('image', models.ImageField(default='images/non.png', upload_to=find.models.PathAndRename('/missing'))),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('time', models.DateTimeField(default=datetime.datetime(2018, 12, 22, 18, 44, 37, 87534))),
                ('found', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Post_type',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Relative',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fullname', models.CharField(max_length=50)),
                ('adress', models.CharField(max_length=100, null=True)),
                ('telephone', models.CharField(max_length=12)),
                ('email', models.EmailField(max_length=254, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Victim',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('place', models.CharField(max_length=100)),
                ('image', models.ImageField(default='images/non.png', upload_to=find.models.PathAndRename('/victim'))),
                ('additional_information', models.CharField(max_length=50, null=True)),
                ('post', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='find.Post')),
            ],
        ),
        migrations.AddField(
            model_name='post',
            name='post_type',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='find.Post_type'),
        ),
        migrations.AddField(
            model_name='post',
            name='relative',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='find.Relative'),
        ),
        migrations.AddField(
            model_name='post',
            name='user',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='missing_person',
            name='post',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='find.Post'),
        ),
        migrations.AddField(
            model_name='comment',
            name='post',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='find.Post'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
