mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-05 02:02:06 +01:00
This commit adds the migration_tracker table which we'll use to track if a custom migration has already been done.
21 lines
312 B
SQL
21 lines
312 B
SQL
-- name: SetMigration :exec
|
|
INSERT INTO
|
|
migration_tracker (version, migration_time)
|
|
VALUES ($1, $2);
|
|
|
|
-- name: GetMigration :one
|
|
SELECT
|
|
migration_time
|
|
FROM
|
|
migration_tracker
|
|
WHERE
|
|
version = $1;
|
|
|
|
-- name: GetDatabaseVersion :one
|
|
SELECT
|
|
version
|
|
FROM
|
|
migration_tracker
|
|
ORDER BY
|
|
version DESC
|
|
LIMIT 1;
|