Delete SOA records correctly on a downgrade
SOA records are now deleted using SQL ORM. Change-Id: I34d8b896015ca5c15c9ce118fc21d521a16a048d Closes-Bug: 1365996
This commit is contained in:
parent
f254a81c12
commit
ba3fe33207
|
@ -164,10 +164,10 @@ def downgrade(migrate_engine):
|
|||
recordsets_table = Table('recordsets', meta, autoload=True)
|
||||
|
||||
# Delete all SOA records
|
||||
recordsets_table.filter_by(type='SOA').delete()
|
||||
recordsets_table.delete().where(recordsets_table.c.type == 'SOA').execute()
|
||||
|
||||
# Remove SOA from the ENUM
|
||||
recordsets_table.c.type.alter(type=Enum(name='record_types',
|
||||
recordsets_table.c.type.alter(type=Enum(name='recordset_types',
|
||||
*RECORD_TYPES))
|
||||
|
||||
# Re-add the constraint for sqlite
|
||||
|
|
Loading…
Reference in New Issue