Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: make migration work on odler sqlite versions #39

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ async def m004_add_settings_counter_direction_asset(db):


async def m005_fix_settings_table_drop_mempool(db):
await db.execute("ALTER TABLE boltz.settings DROP COLUMN boltz_mempool_space_url")
await db.execute(
"ALTER TABLE boltz.settings DROP COLUMN boltz_mempool_space_liquid_url"
"""
CREATE TABLE boltz.settings_backup AS
SELECT boltz_url, boltz_network, boltz_network_liquid FROM boltz.settings
"""
)
await db.execute("DROP TABLE boltz.settings")
# NOTE using `boltz.settings` for the RENAME TO clause will not work in sqlite
await db.execute("ALTER TABLE boltz.settings_backup RENAME TO settings")