Skip to content

Commit

Permalink
fix: migration step to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarde committed Dec 22, 2023
1 parent 83a1748 commit 08c63ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions db.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def migrate_to_v1():

if 'sort_order' not in columns_names:
click.echo('Adding missing field `sort_order` to table `node`.')
cursor.execute('ALTER TABLE `node` ADD `sort_order` INTEGER NOT NULL;')

cursor.execute('ALTER TABLE `node` ADD `sort_order` INTEGER;')
cursor.execute('CREATE UNIQUE INDEX `idx_unique_sort_order` ON `node` (`sort_order`);')

click.echo('Initializing new field `sort_order` with node ID.')
Expand Down

0 comments on commit 08c63ee

Please sign in to comment.