lightning-terminal/firewalldb
Viktor Torstensson 000d28a4fb
multi: deprecate kvdb stores after SQL migration
Mark the legacy kvdb stores as deprecated once the kvdb -> SQL
migration commits successfully. This prevents normal bbolt startup
from reopening accounts.db, session.db, or rules.db after their data
has already been migrated.

Add explicit deprecation checks to the three kvdb store open paths and
provide migration-only constructors that can still reopen deprecated
files when the SQL database is deleted or downgraded and the migration
must be rerun.

Use store-specific tombstones for the deprecation markers and add
tests that verify deprecated stores are rejected while migration
reruns continue to work.
2026-05-14 11:39:14 +02:00
..
action_paginator.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
actions.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
actions_kvdb.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
actions_sql.go firewalldb: use sqldb/v2 in firewalldb package 2026-05-14 11:37:50 +02:00
actions_test.go multi: add AddActionReq MacaroonId helper func 2025-10-03 11:44:05 +02:00
benchmark_test.go multi: rename MigrationStream names to MigrationSet 2026-05-14 11:39:09 +02:00
db.go firewalldb: export FirewallDBs interface 2025-07-21 14:45:45 +02:00
interface.go firewalldb: export FirewallDBs interface 2025-07-21 14:45:45 +02:00
kvdb_store.go multi: deprecate kvdb stores after SQL migration 2026-05-14 11:39:14 +02:00
kvdb_store_deprecation_test.go multi: deprecate kvdb stores after SQL migration 2026-05-14 11:39:14 +02:00
kvstores_kvdb.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
kvstores_sql.go firewalldb: use sqldb/v2 in firewalldb package 2026-05-14 11:37:50 +02:00
kvstores_test.go firewalldb: best effort tight coupling of actions and sessions 2025-05-21 14:14:12 +02:00
log.go multi: update LND and friends 2025-03-26 09:20:52 -05:00
metadata.go firewalldb+log: add main DB structure 2023-01-27 06:47:11 +02:00
mock.go multi: rename GetSessionByID to GetSession 2025-03-04 17:34:31 +02:00
privacy_mapper.go multi+refactor: remove unnecessary type alias 2025-04-22 06:10:48 +02:00
privacy_mapper_kvdb.go firewalldb+lit: plug in SQL privacy mapper 2025-04-22 06:10:48 +02:00
privacy_mapper_sql.go multi: reformat long lines for readability 2025-12-09 16:12:03 +00:00
privacy_mapper_test.go firewalldb: add clock.Clock to firewalldb DB impls 2025-05-13 08:06:16 +02:00
sql_migration.go multi: deprecate kvdb stores after SQL migration 2026-05-14 11:39:14 +02:00
sql_migration_test.go firewalldb: refactor execution of mig test assert 2026-05-14 11:38:15 +02:00
sql_store.go firewalldb: use sqldb/v2 in firewalldb package 2026-05-14 11:37:50 +02:00
test_kvdb.go firewalldb: actions mig handle empty RPCParamsJson 2025-11-18 17:58:44 +01:00
test_postgres.go mutli: rename db.NewTestPostgresV2DB function 2026-05-14 11:37:54 +02:00
test_sql.go firewalldb: use sqldb/v2 in firewalldb package 2026-05-14 11:37:50 +02:00
test_sqlite.go multi: rename MigrationStream names to MigrationSet 2026-05-14 11:39:09 +02:00