From 63a368061648fc51a1ca1227b657c81101cf233c Mon Sep 17 00:00:00 2001 From: "theotherp@gmx.de" Date: Sat, 11 Feb 2017 16:20:57 +0100 Subject: [PATCH] Fixed: Forgot to migrate database, resulting in an error upon NZB download. Closes #543 --- changelog.md | 3 +++ nzbhydra/database.py | 10 +++++++++- version.txt | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index c965c98..c4d1126 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,9 @@ # NZB Hydra changelog ---------- +### 0.2.200 +Fixed: Forgot to migrate database, resulting in an error upon NZB download. See [#543](https://github.com/theotherp/nzbhydra/issues/543). + ### 0.2.199 Fixed: NFO display was broken with last version. Also adapted NFO and log colors to grey theme. diff --git a/nzbhydra/database.py b/nzbhydra/database.py index 489827d..c9ea2ee 100644 --- a/nzbhydra/database.py +++ b/nzbhydra/database.py @@ -19,7 +19,7 @@ db = SqliteQueueDatabase(None, autostart=False, results_timeout=20.0) -DATABASE_VERSION = 16 +DATABASE_VERSION = 17 class JSONField(TextField): @@ -624,3 +624,11 @@ class Meta(object): vi.version = 16 vi.save() logger.info("Database migration completed successfully") + + if vi.version == 16: + logger.info("Dropping time column for NZB downloads") + migrator = SqliteMigrator(db) + with db.transaction(): + migrate( + migrator.drop_column('indexernzbdownload', 'time') + ) \ No newline at end of file diff --git a/version.txt b/version.txt index b7adbdc..f5ca63c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.2.199 \ No newline at end of file +0.2.200 \ No newline at end of file