Remove command fitting from the command fits context menu upon deletion (#1244)

This commit is contained in:
blitzmann
2017-07-11 01:10:39 -04:00
parent 231f9a91c2
commit 453054f6c7
3 changed files with 21 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
"""
Migration 26
- Deletes invalid command fit relationships caused by a bug (see #1244)
"""
import sqlalchemy
def upgrade(saveddata_engine):
saveddata_engine.execute("DELETE FROM commandFits WHERE boosterID NOT IN (SELECT ID FROM fits) OR boostedID NOT IN (SELECT ID FROM fits)")