# Generated by Django 3.1.3 on 2021-01-07 00:42

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.ImageField(null=True, upload_to='')),
                ('description', models.TextField(blank=True, default='')),
                ('likes', models.IntegerField(default=0)),
                ('comments', models.IntegerField(default=0)),
                ('date', models.DateTimeField(default=django.utils.timezone.now)),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user', to=settings.AUTH_USER_MODEL)),
                ('userSubscribed', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='userSubscribed', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.ImageField(blank=True, default='default.png', null=True, upload_to='')),
                ('description', models.TextField(blank=True, default='')),
                ('user', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='api.image')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.TextField()),
                ('date', models.DateTimeField(default=django.utils.timezone.now)),
                ('image', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='api.image')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddConstraint(
            model_name='subscription',
            constraint=models.UniqueConstraint(fields=('user', 'userSubscribed'), name='unique subscribes'),
        ),
        migrations.AddConstraint(
            model_name='like',
            constraint=models.UniqueConstraint(fields=('image', 'user'), name='unique likes'),
        ),
    ]

[((276, 333), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (307, 333), False, 'from django.db import migrations, models\n'), ((3313, 3402), 'django.db.models.UniqueConstraint', 'models.UniqueConstraint', ([], {'fields': "('user', 'userSubscribed')", 'name': '"""unique subscribes"""'}), "(fields=('user', 'userSubscribed'), name=\n    'unique subscribes')\n", (3336, 3402), False, 'from django.db import migrations, models\n'), ((3498, 3568), 'django.db.models.UniqueConstraint', 'models.UniqueConstraint', ([], {'fields': "('image', 'user')", 'name': '"""unique likes"""'}), "(fields=('image', 'user'), name='unique likes')\n", (3521, 3568), False, 'from django.db import migrations, models\n'), ((463, 556), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n    verbose_name='ID')\n", (479, 556), False, 'from django.db import migrations, models\n'), ((583, 625), 'django.db.models.ImageField', 'models.ImageField', ([], {'null': '(True)', 'upload_to': '""""""'}), "(null=True, upload_to='')\n", (600, 625), False, 'from django.db import migrations, models\n'), ((660, 700), 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), "(blank=True, default='')\n", (676, 700), False, 'from django.db import migrations, models\n'), ((729, 759), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (748, 759), False, 'from django.db import migrations, models\n'), ((791, 821), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (810, 821), False, 'from django.db import migrations, models\n'), ((849, 904), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'default': 'django.utils.timezone.now'}), '(default=django.utils.timezone.now)\n', (869, 904), False, 'from django.db import migrations, models\n'), ((932, 1038), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), '(null=True, on_delete=django.db.models.deletion.CASCADE,\n    to=settings.AUTH_USER_MODEL)\n', (949, 1038), False, 'from django.db import migrations, models\n'), ((1172, 1265), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n    verbose_name='ID')\n", (1188, 1265), False, 'from django.db import migrations, models\n'), ((1289, 1416), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""user"""', 'to': 'settings.AUTH_USER_MODEL'}), "(null=True, on_delete=django.db.models.deletion.CASCADE,\n    related_name='user', to=settings.AUTH_USER_MODEL)\n", (1306, 1416), False, 'from django.db import migrations, models\n'), ((1450, 1587), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""userSubscribed"""', 'to': 'settings.AUTH_USER_MODEL'}), "(null=True, on_delete=django.db.models.deletion.CASCADE,\n    related_name='userSubscribed', to=settings.AUTH_USER_MODEL)\n", (1467, 1587), False, 'from django.db import migrations, models\n'), ((1716, 1809), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n    verbose_name='ID')\n", (1732, 1809), False, 'from django.db import migrations, models\n'), ((1836, 1913), 'django.db.models.ImageField', 'models.ImageField', ([], {'blank': '(True)', 'default': '"""default.png"""', 'null': '(True)', 'upload_to': '""""""'}), "(blank=True, default='default.png', null=True, upload_to='')\n", (1853, 1913), False, 'from django.db import migrations, models\n'), ((1948, 1988), 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), "(blank=True, default='')\n", (1964, 1988), False, 'from django.db import migrations, models\n'), ((2016, 2125), 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), '(null=True, on_delete=django.db.models.deletion.CASCADE,\n    to=settings.AUTH_USER_MODEL)\n', (2036, 2125), False, 'from django.db import migrations, models\n'), ((2251, 2344), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n    verbose_name='ID')\n", (2267, 2344), False, 'from django.db import migrations, models\n'), ((2369, 2462), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""api.image"""'}), "(null=True, on_delete=django.db.models.deletion.CASCADE,\n    to='api.image')\n", (2386, 2462), False, 'from django.db import migrations, models\n'), ((2486, 2592), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), '(null=True, on_delete=django.db.models.deletion.CASCADE,\n    to=settings.AUTH_USER_MODEL)\n', (2503, 2592), False, 'from django.db import migrations, models\n'), ((2721, 2814), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n    verbose_name='ID')\n", (2737, 2814), False, 'from django.db import migrations, models\n'), ((2839, 2857), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (2855, 2857), False, 'from django.db import migrations, models\n'), ((2885, 2940), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'default': 'django.utils.timezone.now'}), '(default=django.utils.timezone.now)\n', (2905, 2940), False, 'from django.db import migrations, models\n'), ((2969, 3062), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""api.image"""'}), "(null=True, on_delete=django.db.models.deletion.CASCADE,\n    to='api.image')\n", (2986, 3062), False, 'from django.db import migrations, models\n'), ((3086, 3192), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), '(null=True, on_delete=django.db.models.deletion.CASCADE,\n    to=settings.AUTH_USER_MODEL)\n', (3103, 3192), False, 'from django.db import migrations, models\n')]