payments/db: split migration queries into dedicated SQLMigrationQueries interface
This commit is contained in:
5 files changed
+30
-18
No files matched your search
@@ -89,13 +89,16 @@ type SQLQueries interface {
|
||||
// DeleteFailedAttempts removes all failed HTLCs from the db for a
|
||||
// given payment.
|
||||
DeleteFailedAttempts(ctx context.Context, paymentID int64) error
|
||||
}
|
||||
|
||||
/*
|
||||
Migration specific queries.
|
||||
|
||||
These queries are used ONLY for the one-time migration from KV
|
||||
to SQL.
|
||||
*/
|
||||
// SQLMigrationQueries extends SQLQueries with the additional queries needed
|
||||
// for the one-time migration from KV to SQL. Keeping them in a separate
|
||||
// interface makes it clear which code paths are migration-only and prevents
|
||||
// the regular store from accidentally depending on them.
|
||||
//
|
||||
//nolint:ll
|
||||
type SQLMigrationQueries interface {
|
||||
SQLQueries
|
||||
|
||||
// FetchPaymentsByIDsMig is a migration-only batch fetch that returns
|
||||
// payment data along with HTLC attempt counts for structural
|
||||
|
||||
Reference in new issue
Block a user