accounts.migrations.0003_alter_role_name_alter_role_unique_together

 1# Generated by Django 5.2.1 on 2025-06-04 12:41
 2
 3from django.db import migrations, models
 4
 5
 6class Migration(migrations.Migration):
 7
 8    dependencies = [
 9        ('accounts', '0002_initial'),
10    ]
11
12    operations = [
13        migrations.AlterField(
14            model_name='role',
15            name='name',
16            field=models.CharField(max_length=100, verbose_name='Role Name'),
17        ),
18        migrations.AlterUniqueTogether(
19            name='role',
20            unique_together={('name', 'hospital')},
21        ),
22    ]
class Migration(django.db.migrations.migration.Migration):
 7class Migration(migrations.Migration):
 8
 9    dependencies = [
10        ('accounts', '0002_initial'),
11    ]
12
13    operations = [
14        migrations.AlterField(
15            model_name='role',
16            name='name',
17            field=models.CharField(max_length=100, verbose_name='Role Name'),
18        ),
19        migrations.AlterUniqueTogether(
20            name='role',
21            unique_together={('name', 'hospital')},
22        ),
23    ]

The base class for all migrations.

Migration files will import this from django.db.migrations.Migration and subclass it as a class called Migration. It will have one or more of the following attributes:

  • operations: A list of Operation instances, probably from django.db.migrations.operations
  • dependencies: A list of tuples of (app_path, migration_name)
  • run_before: A list of tuples of (app_path, migration_name)
  • replaces: A list of migration_names

Note that all migrations come out of migrations and into the Loader or Graph as instances, having been initialized with their app label and name.

dependencies = [('accounts', '0002_initial')]
operations = [<AlterField model_name='role', name='name', field=<django.db.models.fields.CharField>>, <AlterUniqueTogether name='role', unique_together={('name', 'hospital')}>]