forked from 0x2620/pandora
can only delete after altering table
This commit is contained in:
parent
5d3c53742a
commit
f48f62b6a0
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,6 @@ from django.db import models
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
orm['sequence.Sequence'].objects.all().delete()
|
|
||||||
|
|
||||||
# Removing unique constraint on 'Sequence', fields ['item', 'end', 'mode', 'start']
|
# Removing unique constraint on 'Sequence', fields ['item', 'end', 'mode', 'start']
|
||||||
db.delete_unique('sequence_sequence', ['item_id', 'end', 'mode', 'start'])
|
db.delete_unique('sequence_sequence', ['item_id', 'end', 'mode', 'start'])
|
||||||
|
@ -32,6 +31,7 @@ class Migration(SchemaMigration):
|
||||||
# Adding unique constraint on 'Sequence', fields ['sort', 'start', 'end', 'mode']
|
# Adding unique constraint on 'Sequence', fields ['sort', 'start', 'end', 'mode']
|
||||||
db.create_unique('sequence_sequence', ['sort_id', 'start', 'end', 'mode'])
|
db.create_unique('sequence_sequence', ['sort_id', 'start', 'end', 'mode'])
|
||||||
|
|
||||||
|
orm['sequence.Sequence'].objects.all().delete()
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
# Removing unique constraint on 'Sequence', fields ['sort', 'start', 'end', 'mode']
|
# Removing unique constraint on 'Sequence', fields ['sort', 'start', 'end', 'mode']
|
||||||
|
|
Loading…
Reference in a new issue