77 "errors"
88 "fmt"
99
10- "github.com/lightninglabs/lightning-terminal/db/sqlc "
10+ "github.com/lightninglabs/lightning-terminal/db/sqlcmig6 "
1111 "github.com/lightningnetwork/lnd/fn"
1212 "github.com/lightningnetwork/lnd/sqldb"
1313 "go.etcd.io/bbolt"
@@ -78,7 +78,7 @@ func (e *kvEntry) namespacedKey() string {
7878// NOTE: As sessions may contain linked sessions and accounts, the sessions and
7979// accounts sql migration MUST be run prior to this migration.
8080func MigrateFirewallDBToSQL (ctx context.Context , kvStore * bbolt.DB ,
81- sqlTx SQLQueries ) error {
81+ sqlTx SQLMig6Queries ) error {
8282
8383 log .Infof ("Starting migration of the rules DB to SQL" )
8484
@@ -99,7 +99,7 @@ func MigrateFirewallDBToSQL(ctx context.Context, kvStore *bbolt.DB,
9999// database to the SQL database. The function also asserts that the
100100// migrated values match the original values in the KV store.
101101func migrateKVStoresDBToSQL (ctx context.Context , kvStore * bbolt.DB ,
102- sqlTx SQLQueries ) error {
102+ sqlTx SQLMig6Queries ) error {
103103
104104 log .Infof ("Starting migration of the KV stores to SQL" )
105105
@@ -361,15 +361,15 @@ func collectKVPairs(bkt *bbolt.Bucket, errorOnBuckets, perm bool,
361361}
362362
363363// insertPair inserts a single key-value pair into the SQL database.
364- func insertPair (ctx context.Context , tx SQLQueries ,
364+ func insertPair (ctx context.Context , tx SQLMig6Queries ,
365365 entry * kvEntry ) (* sqlKvEntry , error ) {
366366
367367 ruleID , err := tx .GetOrInsertRuleID (ctx , entry .ruleName )
368368 if err != nil {
369369 return nil , err
370370 }
371371
372- p := sqlc .InsertKVStoreRecordParams {
372+ p := sqlcmig6 .InsertKVStoreRecordParams {
373373 Perm : entry .perm ,
374374 RuleID : ruleID ,
375375 EntryKey : entry .key ,
@@ -421,13 +421,13 @@ func insertPair(ctx context.Context, tx SQLQueries,
421421
422422// getSQLValue retrieves the key value for the given kvEntry from the SQL
423423// database.
424- func getSQLValue (ctx context.Context , tx SQLQueries ,
424+ func getSQLValue (ctx context.Context , tx SQLMig6Queries ,
425425 entry * sqlKvEntry ) ([]byte , error ) {
426426
427427 switch {
428428 case entry .featureID .Valid && entry .groupID .Valid :
429429 return tx .GetFeatureKVStoreRecord (
430- ctx , sqlc .GetFeatureKVStoreRecordParams {
430+ ctx , sqlcmig6 .GetFeatureKVStoreRecordParams {
431431 Perm : entry .perm ,
432432 RuleID : entry .ruleID ,
433433 GroupID : entry .groupID ,
@@ -437,7 +437,7 @@ func getSQLValue(ctx context.Context, tx SQLQueries,
437437 )
438438 case entry .groupID .Valid :
439439 return tx .GetGroupKVStoreRecord (
440- ctx , sqlc .GetGroupKVStoreRecordParams {
440+ ctx , sqlcmig6 .GetGroupKVStoreRecordParams {
441441 Perm : entry .perm ,
442442 RuleID : entry .ruleID ,
443443 GroupID : entry .groupID ,
@@ -446,7 +446,7 @@ func getSQLValue(ctx context.Context, tx SQLQueries,
446446 )
447447 case ! entry .featureID .Valid && ! entry .groupID .Valid :
448448 return tx .GetGlobalKVStoreRecord (
449- ctx , sqlc .GetGlobalKVStoreRecordParams {
449+ ctx , sqlcmig6 .GetGlobalKVStoreRecordParams {
450450 Perm : entry .perm ,
451451 RuleID : entry .ruleID ,
452452 Key : entry .key ,
0 commit comments