Support proper migration for ishukone scorp (which is skin for regular scorp now)

This commit is contained in:
DarkPhoenix
2015-04-28 18:19:58 +03:00
parent 545d98883a
commit 024e0ad4f5
3 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
"""
Migration 7
- Converts Scorpion Ishukone Watch to Scorpion
Mosaic introduced proper skinning system, and Ishukone Scorp
was the only ship which was presented as stand-alone ship in
Pyfa.
"""
CONVERSIONS = {
640: ( # Scorpion
4005, # Scorpion Ishukone Watch
)
}
def upgrade(saveddata_engine):
# Convert ships
for replacement_item, list in CONVERSIONS.iteritems():
for retired_item in list:
saveddata_engine.execute('UPDATE "fits" SET "shipID" = ? WHERE "shipID" = ?', (replacement_item, retired_item))