mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			813 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			813 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from django.conf import settings
 | |
| from django.db import migrations, models
 | |
| 
 | |
| 
 | |
| class Migration(migrations.Migration):
 | |
|     dependencies = [
 | |
|         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
 | |
|     ]
 | |
| 
 | |
|     operations = [
 | |
|         migrations.CreateModel(
 | |
|             "Author",
 | |
|             [
 | |
|                 ("id", models.AutoField(primary_key=True)),
 | |
|                 ("name", models.CharField(max_length=255)),
 | |
|             ],
 | |
|         ),
 | |
|         migrations.CreateModel(
 | |
|             "Tribble",
 | |
|             [
 | |
|                 ("id", models.AutoField(primary_key=True)),
 | |
|                 (
 | |
|                     "author",
 | |
|                     models.ForeignKey(
 | |
|                         settings.AUTH_USER_MODEL, models.CASCADE, to_field="id"
 | |
|                     ),
 | |
|                 ),
 | |
|             ],
 | |
|         ),
 | |
|     ]
 |