mirror of
https://github.com/lightninglabs/faraday.git
synced 2026-08-13 12:33:35 +02:00
30 lines
854 B
Go
30 lines
854 B
Go
package db
|
|
|
|
import (
|
|
"github.com/golang-migrate/migrate/v4"
|
|
"github.com/golang-migrate/migrate/v4/database/pgx/v5"
|
|
"github.com/lightningnetwork/lnd/sqldb/v2"
|
|
)
|
|
|
|
var (
|
|
FaradayMigrationSet = sqldb.MigrationSet{
|
|
TrackingTableName: pgx.DefaultMigrationsTable,
|
|
SQLFileDirectory: "sqlc/migrations",
|
|
SQLFiles: sqlSchemas,
|
|
|
|
// LatestMigrationVersion is the latest migration version of the
|
|
// database. This is used to implement downgrade protection for
|
|
// the daemon.
|
|
//
|
|
// NOTE: This MUST be updated when a new migration is added.
|
|
LatestMigrationVersion: LatestMigrationVersion,
|
|
|
|
MakeProgrammaticMigrations: func(
|
|
db *sqldb.BaseDB,
|
|
) (map[uint]migrate.ProgrammaticMigrEntry, error) {
|
|
|
|
return make(map[uint]migrate.ProgrammaticMigrEntry), nil
|
|
},
|
|
}
|
|
FaradayMigrationSets = []sqldb.MigrationSet{FaradayMigrationSet}
|
|
)
|