Hook the payments KV→SQL migration into the SQL migration config. The migration is still only available when building with the build tag "test_native_sql". Moreover a tombstone protection similar to the invoice migration is added to prevent re-runningi with the KV backend once migration completes.
26 lines
585 B
Go
26 lines
585 B
Go
//go:build test_db_postgres || test_db_sqlite || test_native_sql
|
|
|
|
package sqldb
|
|
|
|
var migrationAdditions = []MigrationConfig{
|
|
{
|
|
Name: "000010_payments",
|
|
Version: 12,
|
|
SchemaVersion: 10,
|
|
},
|
|
{
|
|
Name: "000011_payment_duplicates",
|
|
Version: 13,
|
|
SchemaVersion: 11,
|
|
},
|
|
{
|
|
Name: "kv_payments_migration",
|
|
Version: 14,
|
|
SchemaVersion: 11,
|
|
// A migration function may be attached to this
|
|
// migration to migrate KV payments to the native SQL
|
|
// schema. This is optional and can be disabled by the
|
|
// user if necessary.
|
|
},
|
|
}
|