From 072ad028a364c8dcce626d3ffbff8f835f37a100 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Wed, 24 Jul 2019 19:50:58 +0300 Subject: [PATCH] Add extra columns to target profile table --- eos/db/migrations/upgrade32.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 eos/db/migrations/upgrade32.py diff --git a/eos/db/migrations/upgrade32.py b/eos/db/migrations/upgrade32.py new file mode 100644 index 000000000..df18d0e06 --- /dev/null +++ b/eos/db/migrations/upgrade32.py @@ -0,0 +1,16 @@ +""" +Migration 32 + +- added speed, sig and radius columns to targetResists table +""" + + +import sqlalchemy + + +def upgrade(saveddata_engine): + for column in ('maxVelocity', 'signatureRadius', 'radius'): + try: + saveddata_engine.execute("SELECT {} FROM targetResists LIMIT 1;".format(column)) + except sqlalchemy.exc.DatabaseError: + saveddata_engine.execute("ALTER TABLE targetResists ADD COLUMN {} FLOAT;".format(column))