diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-04-22 15:04:53 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-04-22 15:04:53 +0000 |
commit | 7cffc6242246a6232016d564b2e6b0521a7699b9 (patch) | |
tree | 6e3d4bf9648ee09ca462b6f5a45cd42a1c9a58b9 /lorrycontroller | |
parent | 484f1032224c87719459e334f936f145212c3cd9 (diff) | |
download | lorry-controller-7cffc6242246a6232016d564b2e6b0521a7699b9.tar.gz |
Add a version table
Diffstat (limited to 'lorrycontroller')
-rw-r--r-- | lorrycontroller/statedb.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lorrycontroller/statedb.py b/lorrycontroller/statedb.py index b7950e1..1f18189 100644 --- a/lorrycontroller/statedb.py +++ b/lorrycontroller/statedb.py @@ -87,6 +87,10 @@ class StateDB(object): logging.debug('Initialising tables in database') c = self._conn.cursor() + # Table for storing database schema version. + c.execute('CREATE TABLE version (running INT)') + c.execute('INSERT INTO version VALUES (1)') + # Table for holding the "are we scheduling jobs" value. c.execute('CREATE TABLE running_queue (running INT)') c.execute('INSERT INTO running_queue VALUES (1)') |