From 5a1ffdad7c6b0de7e2eaf1d936311e637c67c72c Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Sat, 11 Aug 2018 08:56:54 -0400 Subject: [PATCH] Fix for wrong create column at the right place --- update_db.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/update_db.py b/update_db.py index fafb2d2e9..a1756b185 100644 --- a/update_db.py +++ b/update_db.py @@ -56,13 +56,6 @@ if os.path.exists(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) else: c.execute('UPDATE table_settings_general SET minimum_score="0"') - try: - c.execute('alter table table_settings_general add column "minimum_score_movie" "text"') - except: - pass - else: - c.execute('UPDATE table_settings_general SET minimum_score_movie="0"') - try: c.execute('alter table table_settings_general add column "use_scenename" "text"') except: @@ -171,6 +164,13 @@ if os.path.exists(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) else: c.execute('UPDATE table_settings_general SET page_size="25"') + try: + c.execute('alter table table_settings_general add column "minimum_score_movie" "text"') + except: + pass + else: + c.execute('UPDATE table_settings_general SET minimum_score_movie="0"') + try: c.execute('DELETE FROM table_settings_notifier WHERE rowid > 24') #Modify this if we add more notification provider rows = c.execute('SELECT name FROM table_settings_notifier WHERE name = "Discord"').fetchall()