-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/projections'
- Loading branch information
Showing
18 changed files
with
829 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
Migration 10 | ||
- Adds active attribute to projected fits | ||
""" | ||
|
||
import sqlalchemy | ||
|
||
def upgrade(saveddata_engine): | ||
# Update projectedFits schema to include active attribute | ||
try: | ||
saveddata_engine.execute("SELECT active FROM projectedFits LIMIT 1") | ||
except sqlalchemy.exc.DatabaseError: | ||
saveddata_engine.execute("ALTER TABLE projectedFits ADD COLUMN active BOOLEAN") | ||
saveddata_engine.execute("UPDATE projectedFits SET active = 1") | ||
saveddata_engine.execute("UPDATE projectedFits SET amount = 1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.