From dffa13e0a4f694e59df7cba9d77ff70b185f8555 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 18 Jan 2014 17:01:10 -0800 Subject: [PATCH] fix migration field detection --- beets/dbcore.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beets/dbcore.py b/beets/dbcore.py index 12b95e015..125ae5c7b 100644 --- a/beets/dbcore.py +++ b/beets/dbcore.py @@ -678,7 +678,7 @@ class Database(object): rows = tx.query('PRAGMA table_info(%s)' % table) current_fields = set([row[1] for row in rows]) - field_names = set([f[0] for f in fields]) + field_names = set(fields.keys()) if current_fields.issuperset(field_names): # Table exists and has all the required columns. return @@ -692,7 +692,7 @@ class Database(object): ', '.join(columns)) else: - # Table exists but is missing fields. + # Table exists does not match the field set. setup_sql = '' for name, typ in fields.items(): if name in current_fields: