jbrusey / cogent-house

Cogent House is a system for sensing temperature, humidity, CO2, Air Quality, VOC, hot water consumption, and electricity consumption within the home. It has been developed by the [http://cogentcomputing.org Cogent Computing Applied Research Centre] at Coventry University. Cogent House is developed using TinyOS and Python.
4 stars 2 forks source link

Alembic scripts are faulty #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Quite why we have some of the alembic stuff we have is a mystery.
Additionally, many of the databases used on the nodes have no alembic version 
so actually using alembic becomes problematic.   

For example: 
The "13xxxx Create from Scratch" Causes problems.
At some point, a scripts functionality was changed. 
We have managed to get two heads in the alembic history.

Generally, the work around has been to delete tables (where possible)
Then recreate the database to a known version using the populate_database 
script.

Original issue reported on code.google.com by DjGoldsm...@googlemail.com on 4 Feb 2014 at 11:37

GoogleCodeExporter commented 9 years ago

Original comment by DjGoldsm...@googlemail.com on 13 Feb 2014 at 10:03

GoogleCodeExporter commented 9 years ago
Ensure that the initial database cannot be created or populated by any means 
other than the populate_database script.

Original comment by DjGoldsm...@googlemail.com on 17 Feb 2014 at 1:27

GoogleCodeExporter commented 9 years ago

Original comment by james.br...@gmail.com on 20 Feb 2014 at 9:33

GoogleCodeExporter commented 9 years ago
suggestion: write the alembic version; don't allow baselogger to start unless 
the alembic version has been written (or run populate_database from there)

Original comment by james.br...@gmail.com on 5 Mar 2014 at 10:51

GoogleCodeExporter commented 9 years ago
Fixed this by only creating database through initialise-cogent-db shell script.

Original comment by DjGoldsm...@googlemail.com on 28 Mar 2014 at 9:50