mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.7.x] Fixed #22749: Making SQL management commands migration aware.
This commit is contained in:
		
				
					committed by
					
						 Andrew Godwin
						Andrew Godwin
					
				
			
			
				
	
			
			
			
						parent
						
							98949e3b10
						
					
				
				
					commit
					3fc4f03895
				
			
							
								
								
									
										33
									
								
								tests/commands_sql_migrations/migrations/0001_initial.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								tests/commands_sql_migrations/migrations/0001_initial.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| # -*- coding: utf-8 -*- | ||||
| from __future__ import unicode_literals | ||||
|  | ||||
| from django.db import models, migrations | ||||
|  | ||||
|  | ||||
| class Migration(migrations.Migration): | ||||
|  | ||||
|     dependencies = [ | ||||
|     ] | ||||
|  | ||||
|     operations = [ | ||||
|         migrations.CreateModel( | ||||
|             name='Comment', | ||||
|             fields=[ | ||||
|                 ('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)), | ||||
|             ], | ||||
|             options={ | ||||
|             }, | ||||
|             bases=(models.Model,), | ||||
|         ), | ||||
|         migrations.CreateModel( | ||||
|             name='Book', | ||||
|             fields=[ | ||||
|                 ('id', models.AutoField(verbose_name='ID', primary_key=True, serialize=False, auto_created=True)), | ||||
|                 ('title', models.CharField(db_index=True, max_length=100)), | ||||
|                 ('comments', models.ManyToManyField(to='commands_sql_migrations.Comment')), | ||||
|             ], | ||||
|             options={ | ||||
|             }, | ||||
|             bases=(models.Model,), | ||||
|         ), | ||||
|     ] | ||||
		Reference in New Issue
	
	Block a user