# 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'),
        ),
    ]

[(14, 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), False, 'from django.db import migrations, models\n'), (67, 'django.db.models.UniqueConstraint', 'models.UniqueConstraint', ([], {'fields': "('user', 'userSubscribed')", 'name': '"""unique subscribes"""'}), False, 'from django.db import migrations, models\n'), (71, 'django.db.models.UniqueConstraint', 'models.UniqueConstraint', ([], {'fields': "('image', 'user')", 'name': '"""unique likes"""'}), False, 'from django.db import migrations, models\n'), (21, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (22, 'django.db.models.ImageField', 'models.ImageField', ([], {'null': '(True)', 'upload_to': '""""""'}), False, 'from django.db import migrations, models\n'), (23, 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), False, 'from django.db import migrations, models\n'), (24, 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), False, 'from django.db import migrations, models\n'), (25, 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), False, 'from django.db import migrations, models\n'), (26, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'default': 'django.utils.timezone.now'}), False, 'from django.db import migrations, models\n'), (27, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (33, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (34, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""user"""', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (35, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""userSubscribed"""', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (41, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (42, 'django.db.models.ImageField', 'models.ImageField', ([], {'blank': '(True)', 'default': '"""default.png"""', 'null': '(True)', 'upload_to': '""""""'}), False, 'from django.db import migrations, models\n'), (43, 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), False, 'from django.db import migrations, models\n'), (44, 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (50, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (51, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""api.image"""'}), False, 'from django.db import migrations, models\n'), (52, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (58, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (59, 'django.db.models.TextField', 'models.TextField', ([], {}), False, 'from django.db import migrations, models\n'), (60, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'default': 'django.utils.timezone.now'}), False, 'from django.db import migrations, models\n'), (61, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""api.image"""'}), False, 'from django.db import migrations, models\n'), (62, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n')]