mirror of
				https://github.com/django/django.git
				synced 2025-11-03 21:25:09 +00:00 
			
		
		
		
	Refs #26709 -- Required a name for Indexes passed to AddIndex.
Thanks to Markush for discussions.
This commit is contained in:
		
							parent
							
								
									f1af076fba
								
							
						
					
					
						commit
						b1e7d19d4c
					
				
					 3 changed files with 14 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -215,10 +215,8 @@ For example, to add an index on the ``title`` and ``author`` fields of the
 | 
			
		|||
            ),
 | 
			
		||||
        ]
 | 
			
		||||
 | 
			
		||||
If you're writing your own migration to add an index, it's recommended to pass
 | 
			
		||||
a ``name`` to the ``index`` as done above so that you can reference it if you
 | 
			
		||||
later want to remove it. Otherwise, a name will be autogenerated and you'll
 | 
			
		||||
have to inspect the database to find the index name if you want to remove it.
 | 
			
		||||
If you're writing your own migration to add an index, you must assign a
 | 
			
		||||
``name`` to the ``index`` as done above.
 | 
			
		||||
 | 
			
		||||
``RemoveIndex``
 | 
			
		||||
---------------
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue