payments/db: split migration queries into dedicated SQLMigrationQueries interface
This commit is contained in:
5 files changed
+30
-18
No files matched your search
@@ -67,8 +67,14 @@ func TestMigrationWithExternalDB(t *testing.T) {
|
||||
// Run migration in a transaction.
|
||||
err := sqlStore.db.ExecTx(
|
||||
ctx, sqldb.WriteTxOpt(), func(tx SQLQueries) error {
|
||||
migTx, ok := tx.(SQLMigrationQueries)
|
||||
if !ok {
|
||||
return fmt.Errorf("db does not " +
|
||||
"implement SQLMigrationQueries")
|
||||
}
|
||||
|
||||
return MigratePaymentsKVToSQL(
|
||||
ctx, kvBackend, tx, &SQLStoreConfig{
|
||||
ctx, kvBackend, migTx, &SQLStoreConfig{
|
||||
QueryCfg: sqlStore.cfg.QueryCfg,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user