text: # Generated by Django 3.2.9 on 2021-12-21 15:04
  
  from django.conf import settings
  from django.db import migrations, models
  
  
  def migrate_owners(apps, schema_editor):
      Study = apps.get_model('studies', 'Study')  # noqa: N806
      for study in Study.objects.all():
          study.owners.add(study.creator)
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
          ('studies', '0020_auto_20211214_2225'),
      ]
  
      operations = [
          migrations.AddField(
              model_name='study',
              name='owners',
              field=models.ManyToManyField(related_name='owned_studies', to=settings.AUTH_USER_MODEL),
          ),
          migrations.RunPython(migrate_owners),
      ]
  