From 1bdfd7f9246f2262d444b7efb617267b75880489 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Tue, 30 Sep 2014 18:03:04 -0400 Subject: [PATCH] Those who keep up with dev branch had issues with new migrations. --- eos/db/migrations/upgrade1.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eos/db/migrations/upgrade1.py b/eos/db/migrations/upgrade1.py index f30e39331..1d8417dfc 100644 --- a/eos/db/migrations/upgrade1.py +++ b/eos/db/migrations/upgrade1.py @@ -11,6 +11,8 @@ Migration 1 and output of itemDiff.py """ +import sqlalchemy + CONVERSIONS = { 6135: [ # Scoped Cargo Scanner 6133, # Interior Type-E Cargo Identifier @@ -82,7 +84,10 @@ CONVERSIONS = { def upgrade(saveddata_engine): # Update fits schema - saveddata_engine.execute("ALTER TABLE fits ADD COLUMN targetResistsID INTEGER;") + try: + saveddata_engine.execute("SELECT targetResistsID FROM fits LIMIT 1") + except sqlalchemy.exc.DatabaseError: + saveddata_engine.execute("ALTER TABLE fits ADD COLUMN targetResistsID INTEGER;") # Convert modules for replacement_item, list in CONVERSIONS.iteritems():