mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-23 20:23:54 +02:00
sqldb: use the new schema
We put this new schema update into the main line and change the versions of the schema updates which are currently only available in dev builds. The schemas need to be chronological therefore we also need to rename the file numbers.
This commit is contained in:
@@ -46,7 +46,7 @@ func (d *DefaultDatabaseBuilder) getGraphStore(baseDB *sqldb.BaseDB,
|
||||
|
||||
// graphSQLMigration is the version number for the graph migration
|
||||
// that migrates the KV graph to the native SQL schema.
|
||||
const graphSQLMigration = 9
|
||||
const graphSQLMigration = 10
|
||||
|
||||
// getSQLMigration returns a migration function for the given version.
|
||||
func (d *DefaultDatabaseBuilder) getSQLMigration(ctx context.Context,
|
||||
|
@@ -73,6 +73,11 @@ var (
|
||||
// schema. This is optional and can be disabled by the
|
||||
// user if necessary.
|
||||
},
|
||||
{
|
||||
Name: "000007_invoice_add_settled_index",
|
||||
Version: 8,
|
||||
SchemaVersion: 7,
|
||||
},
|
||||
}, migrationAdditions...)
|
||||
|
||||
// ErrMigrationMismatch is returned when a migrated record does not
|
||||
|
@@ -4,14 +4,14 @@ package sqldb
|
||||
|
||||
var migrationAdditions = []MigrationConfig{
|
||||
{
|
||||
Name: "000007_graph",
|
||||
Version: 8,
|
||||
SchemaVersion: 7,
|
||||
Name: "000008_graph",
|
||||
Version: 9,
|
||||
SchemaVersion: 8,
|
||||
},
|
||||
{
|
||||
Name: "kv_graph_migration",
|
||||
Version: 9,
|
||||
SchemaVersion: 7,
|
||||
Version: 10,
|
||||
SchemaVersion: 8,
|
||||
// A migration function may be attached to this
|
||||
// migration to migrate KV graph to the native SQL
|
||||
// schema. This is optional and can be disabled by the
|
||||
|
@@ -2,4 +2,9 @@
|
||||
|
||||
package sqldb
|
||||
|
||||
// migrationAdditions is a list of migrations that are added to the
|
||||
// migrationConfig slice.
|
||||
//
|
||||
// NOTE: This should always be empty and instead migrations for production
|
||||
// should be added into the main line (see migrations.go).
|
||||
var migrationAdditions []MigrationConfig
|
||||
|
Reference in New Issue
Block a user