mirror of
https://github.com/beetbox/beets.git
synced 2026-01-17 21:52:34 +01:00
fix migration field detection
This commit is contained in:
parent
a0ffde7114
commit
dffa13e0a4
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue