1. from django.db import migrations, models
    
  2. 
    
  3. 
    
  4. class Migration(migrations.Migration):
    
  5.     """
    
  6.     This is a wee bit crazy, but it's just to show that run_before works.
    
  7.     """
    
  8. 
    
  9.     dependencies = [
    
  10.         ("migrations", "0001_initial"),
    
  11.     ]
    
  12. 
    
  13.     run_before = [
    
  14.         ("migrations", "0002_second"),
    
  15.     ]
    
  16. 
    
  17.     operations = [
    
  18.         migrations.CreateModel(
    
  19.             "Author",
    
  20.             [
    
  21.                 ("id", models.AutoField(primary_key=True)),
    
  22.                 ("name", models.CharField(max_length=255)),
    
  23.                 ("slug", models.SlugField(null=True)),
    
  24.                 ("age", models.IntegerField(default=0)),
    
  25.             ],
    
  26.         )
    
  27.     ]