# Generated by Django 3.1 on 2020-09-26 01:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('manageuser', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Goal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.CharField(max_length=100)),
                ('name', models.CharField(max_length=30)),
                ('image', models.ImageField(upload_to='')),
                ('starttime', models.TimeField()),
                ('endtime', models.TimeField()),
                ('url', models.URLField()),
                ('explanation', models.TextField(max_length=1000)),
                ('otherinfo', models.TextField(max_length=1000)),
            ],
        ),
        migrations.CreateModel(
            name='Prefecture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Impression',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('impression', models.TextField(max_length=1000)),
                ('good', models.IntegerField()),
                ('goal_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='managegoal.goal')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='manageuser.user')),
            ],
        ),
        migrations.AddField(
            model_name='goal',
            name='prefecture_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='managegoal.prefecture'),
        ),
        migrations.AddField(
            model_name='goal',
            name='user_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='manageuser.user'),
        ),
        migrations.CreateModel(
            name='changedhistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('changedvariable', models.TextField(max_length=1000)),
                ('before', models.TextField(max_length=1000)),
                ('after', models.TextField(max_length=1000)),
                ('goal_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='managegoal.goal')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='manageuser.user')),
            ],
        ),
        migrations.CreateModel(
            name='Changeapplication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('changedvariable', models.CharField(max_length=30)),
                ('before', models.TextField(max_length=1000)),
                ('after', models.TextField(max_length=1000)),
                ('good', models.IntegerField()),
                ('goal_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='managegoal.goal')),
                ('good_users', models.ManyToManyField(to='manageuser.User')),
            ],
        ),
    ]
