text: # Generated by Django 3.2.9 on 2021-12-02 14:20
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Group',
              fields=[
                  ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=255, unique=True)),
                  ('description', models.CharField(max_length=511, null=True)),
                  ('leader', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='leader', to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='GroupGoals',
              fields=[
                  ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('book_url', models.CharField(max_length=255)),
                  ('title', models.CharField(max_length=255, unique=True)),
                  ('image_url', models.CharField(max_length=255)),
                  ('deadline', models.DateField(null=True)),
                  ('description', models.CharField(max_length=511, null=True)),
                  ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='groups.group')),
              ],
          ),
          migrations.CreateModel(
              name='JoinGroupRequest',
              fields=[
                  ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='requests', to='groups.group')),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='GroupUser',
              fields=[
                  ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('is_admin', models.BooleanField(default=False)),
                  ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='groups.group')),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='GroupGoalsUsers',
              fields=[
                  ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('completed', models.BooleanField(default=False)),
                  ('group_goal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='groups.groupgoals')),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.AddField(
              model_name='groupgoals',
              name='members',
              field=models.ManyToManyField(through='groups.GroupGoalsUsers', to=settings.AUTH_USER_MODEL),
          ),
          migrations.AddField(
              model_name='groupgoals',
              name='owner',
              field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='owner', to=settings.AUTH_USER_MODEL),
          ),
          migrations.AddField(
              model_name='group',
              name='users',
              field=models.ManyToManyField(through='groups.GroupUser', to=settings.AUTH_USER_MODEL),
          ),
      ]
  