text: # Generated by Django 2.1 on 2018-09-10 07:13
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  import validators
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Board',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=20)),
                  ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='BoardContains',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('board', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='social.Board')),
              ],
          ),
          migrations.CreateModel(
              name='Comment',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('content', models.CharField(max_length=1000)),
                  ('time', models.DateTimeField(auto_now_add=True)),
              ],
          ),
          migrations.CreateModel(
              name='Followers',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('time', models.DateTimeField(auto_now_add=True)),
                  ('following', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='following', to=settings.AUTH_USER_MODEL)),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user', to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='Like',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('time', models.DateTimeField(auto_now_add=True)),
              ],
          ),
          migrations.CreateModel(
              name='Notification',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('action_type', models.IntegerField()),
                  ('action_data', models.CharField(max_length=2048)),
                  ('time', models.DateTimeField(auto_now_add=True)),
                  ('subject_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subject_user', to=settings.AUTH_USER_MODEL)),
                  ('target_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='target_user', to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='Posts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('picture', models.ImageField(upload_to='post_pictures/', validators=[validators.validate_image])),
                  ('caption', models.CharField(blank=True, max_length=1000, null=True)),
                  ('time', models.DateTimeField(auto_now_add=True)),
                  ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owner', to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='Request',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('request_time', models.DateTimeField(auto_now_add=True)),
                  ('requestee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='requestee', to=settings.AUTH_USER_MODEL)),
                  ('requester', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='requester', to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='TagContains',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='social.Posts')),
              ],
          ),
          migrations.CreateModel(
              name='Tags',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=40, validators=[validators.validate_tag])),
              ],
          ),
          migrations.AddField(
              model_name='tagcontains',
              name='tag',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='social.Tags'),
          ),
          migrations.AddField(
              model_name='like',
              name='post',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='post_like', to='social.Posts'),
          ),
          migrations.AddField(
              model_name='like',
              name='user',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_like', to=settings.AUTH_USER_MODEL),
          ),
          migrations.AddField(
              model_name='comment',
              name='post',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='post_comment', to='social.Posts'),
          ),
          migrations.AddField(
              model_name='comment',
              name='user',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_comment', to=settings.AUTH_USER_MODEL),
          ),
          migrations.AddField(
              model_name='boardcontains',
              name='post',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='social.Posts'),
          ),
          migrations.AlterUniqueTogether(
              name='tagcontains',
              unique_together={('tag', 'post')},
          ),
          migrations.AlterUniqueTogether(
              name='request',
              unique_together={('requester', 'requestee')},
          ),
          migrations.AlterUniqueTogether(
              name='like',
              unique_together={('user', 'post')},
          ),
          migrations.AlterUniqueTogether(
              name='followers',
              unique_together={('user', 'following')},
          ),
          migrations.AlterUniqueTogether(
              name='comment',
              unique_together={('user', 'post', 'content')},
          ),
          migrations.AlterUniqueTogether(
              name='board',
              unique_together={('owner', 'name')},
          ),
      ]
  