mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopdb: fix migration 13 for Postgres
Don't copy values of ID column from sweeps to sweeps2 and let it auto-assign values there. This is needed for the sequencer for that column to be up-to-date with the values.
This commit is contained in:
parent
bfe7991c4e
commit
38b7ecdb9d
1 changed files with 3 additions and 3 deletions
|
|
@ -48,10 +48,9 @@ WITH RECURSIVE seq(i) AS (
|
|||
SELECT i + 1 FROM seq WHERE i < 32
|
||||
)
|
||||
INSERT INTO sweeps2 (
|
||||
id, swap_hash, batch_id, outpoint, amt, completed
|
||||
swap_hash, batch_id, outpoint, amt, completed
|
||||
)
|
||||
SELECT
|
||||
id,
|
||||
swap_hash,
|
||||
batch_id,
|
||||
(
|
||||
|
|
@ -60,7 +59,8 @@ SELECT
|
|||
) || ':' || CAST(outpoint_index AS TEXT),
|
||||
amt,
|
||||
completed
|
||||
FROM sweeps;
|
||||
FROM sweeps
|
||||
ORDER BY id ASC;
|
||||
|
||||
-- Rename tables.
|
||||
ALTER TABLE sweeps RENAME TO sweeps_old;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue