refactor(db)!: finalize pooled WNDB v2 migration
This commit is contained in:
@@ -93,7 +93,10 @@ def _delete_pattern(name: str, cs: ChangeSet) -> DatabaseCommand:
|
||||
id = cs.operations[0]['id']
|
||||
f_id = sql_literal(id)
|
||||
|
||||
statement = f"delete from network.patterns where id = {f_id};"
|
||||
statement = (
|
||||
f"update network.demands set pattern_id = null where pattern_id = {f_id};"
|
||||
f"\ndelete from network.patterns where id = {f_id};"
|
||||
)
|
||||
|
||||
change = g_delete_prefix | { 'type': 'pattern' } | { 'id': id }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user