-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57e2e31
commit c7e08d6
Showing
4 changed files
with
33 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- +migrate Down | ||
DROP TABLE IF EXISTS data_node.sync_tasks CASCADE; | ||
|
||
-- +migrate Up | ||
CREATE TABLE data_node.sync_tasks | ||
( | ||
task VARCHAR PRIMARY KEY, | ||
block BIGINT NOT NULL, | ||
processed TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() | ||
); | ||
|
||
-- transfer data from old table to new | ||
INSERT INTO data_node.sync_tasks (task, block) | ||
SELECT 'L1', MAX(block) FROM data_node.sync_info; | ||
|
||
DROP TABLE IF EXISTS data_node.sync_info CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters