From 7fea0c9431f4630c84dd7f5db4793160d939215c Mon Sep 17 00:00:00 2001 From: blitzman Date: Wed, 15 Feb 2017 21:01:58 -0500 Subject: [PATCH] Add migration script for #728 --- eos/db/migrations/upgrade21.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 eos/db/migrations/upgrade21.py diff --git a/eos/db/migrations/upgrade21.py b/eos/db/migrations/upgrade21.py new file mode 100644 index 000000000..8545f5ecf --- /dev/null +++ b/eos/db/migrations/upgrade21.py @@ -0,0 +1,9 @@ +""" +Migration 21 + +- Fixes discrepancy in drone table where we may have an amount active that is not equal to the amount in the stack + (we don't support activating only 2/5 drones). See GH issue #728 +""" + +def upgrade(saveddata_engine): + saveddata_engine.execute("UPDATE drones SET amountActive = amount where amountActive > 0 AND amountActive <> amount;")