Created
April 27, 2022 00:02
-
-
Save ankane/3470fffd422f57b75e1bd839d4835c5c to your computer and use it in GitHub Desktop.
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
createdb pgsync_repro1 | |
createdb pgsync_repro2 | |
psql pgsync_repro1 << SQL | |
CREATE TABLE posts ( | |
id BIGINT PRIMARY KEY, | |
linked_post_id BIGINT, | |
FOREIGN KEY (linked_post_id) REFERENCES posts (id) | |
); | |
INSERT INTO posts VALUES (1, NULL), (2, 1); | |
SQL | |
psql pgsync_repro2 << SQL | |
CREATE TABLE posts ( | |
id BIGINT PRIMARY KEY, | |
linked_post_id BIGINT, | |
FOREIGN KEY (linked_post_id) REFERENCES posts (id) | |
); | |
SQL | |
pgsync --from pgsync_repro1 --to pgsync_repro2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment