Commits

Anonymous committed 49b2bde

specify unique as a kwarg in creating unique_together indexes. reads easier

Comments (0)

Files changed (1)

management/commands/startmigration.py

                         columns = ["'%s'" % model._meta.get_field(f).column for f in unique]
                         
                         forwards += '''
-        db.create_index('%s', [%s], True, db_tablespace='%s')
+        db.create_index('%s', [%s], unique=True, db_tablespace='%s')
         ''' %   (
                         table_name,
                         ','.join(columns),