Delete projected modules from citadels

This commit is contained in:
blitzman
2016-08-28 20:22:30 -04:00
parent c5b78c20e5
commit ed24ef2615
4 changed files with 6599 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
"""
Migration 15
- Delete projected modules on citadels
"""
import sqlalchemy
def upgrade(saveddata_engine):
sql = """
DELETE FROM modules WHERE ID IN
(
SELECT m.ID FROM modules AS m
JOIN fits AS f ON m.fitID = f.ID
WHERE f.shipID IN ("35832", "35833", "35834", "40340")
AND m.projected = 1
)
"""
saveddata_engine.execute(sql)