forked from fordfrog/apgdiff
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic support for foreign tables
- Loading branch information
1 parent
17d958c
commit a9e43b4
Showing
16 changed files
with
120 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ [email protected]. | |
* Add support for ALTER TABLE ... OWNER TO (serge-pouliquen-itf) | ||
* Add support for CREATE TYPE (Karol Rybak) | ||
* Add support for CREATE EXTENSION (Átila Camurça Alves) | ||
* Add basic support for CREATE FOREIGN TABLE (Bruno Almeida) | ||
|
||
#### Fixes | ||
* Added hint to use "CREATE TABLE ... CONSTRAINT name PRIMARY KEY/UNIQUE ..." | ||
|
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
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
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
4 changes: 4 additions & 0 deletions
4
src/test/resources/cz/startnet/utils/pgdiff/foreign_alter_type_diff.sql
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,4 @@ | ||
ALTER FOREIGN TABLE foreign_to_alter | ||
ADD COLUMN country_code character varying(5), | ||
ALTER COLUMN ref2 TYPE character varying(20) /* TYPE change - table: foreign_to_alter original: character varying(60) new: character varying(20) */, | ||
ALTER COLUMN deleted TYPE numeric(1,0) /* TYPE change - table: foreign_to_alter original: boolean new: numeric(1,0) */; |
17 changes: 17 additions & 0 deletions
17
src/test/resources/cz/startnet/utils/pgdiff/foreign_alter_type_new.sql
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,17 @@ | ||
CREATE FOREIGN TABLE foreign_to_alter ( | ||
id bigint, | ||
user_id bigint, | ||
ref1 character varying(60), | ||
ref2 character varying(20), | ||
inplay_stake_coef numeric, | ||
pre_match_stake_coef numeric, | ||
punter_limits character varying, | ||
name character varying(60), | ||
colour_cat character varying(30), | ||
deleted numeric(1,0), | ||
country_code character varying(5) | ||
) | ||
SERVER ats | ||
OPTIONS ( | ||
updatable 'false' | ||
); |
16 changes: 16 additions & 0 deletions
16
src/test/resources/cz/startnet/utils/pgdiff/foreign_alter_type_original.sql
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 @@ | ||
CREATE FOREIGN TABLE foreign_to_alter ( | ||
id bigint, | ||
user_id bigint, | ||
ref1 character varying(60), | ||
ref2 character varying(60), | ||
inplay_stake_coef numeric, | ||
pre_match_stake_coef numeric, | ||
punter_limits character varying, | ||
name character varying(60), | ||
colour_cat character varying(30), | ||
deleted boolean | ||
) | ||
SERVER ats | ||
OPTIONS ( | ||
updatable 'false' | ||
); |
7 changes: 7 additions & 0 deletions
7
src/test/resources/cz/startnet/utils/pgdiff/foreign_create_table_diff.sql
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,7 @@ | ||
|
||
CREATE FOREIGN TABLE foreign_to_create ( | ||
id bigint | ||
)SERVER ats | ||
OPTIONS ( | ||
updatable 'false' | ||
); |
7 changes: 7 additions & 0 deletions
7
src/test/resources/cz/startnet/utils/pgdiff/foreign_create_table_new.sql
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,7 @@ | ||
|
||
CREATE FOREIGN TABLE foreign_to_create ( | ||
id bigint | ||
) SERVER ats | ||
OPTIONS ( | ||
updatable 'false' | ||
); |
Empty file.
2 changes: 2 additions & 0 deletions
2
src/test/resources/cz/startnet/utils/pgdiff/foreign_drop_table_diff.sql
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,2 @@ | ||
|
||
DROP FOREIGN TABLE foreign_to_drop; |
Empty file.
7 changes: 7 additions & 0 deletions
7
src/test/resources/cz/startnet/utils/pgdiff/foreign_drop_table_original.sql
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,7 @@ | ||
CREATE FOREIGN TABLE foreign_to_drop ( | ||
id bigint | ||
) | ||
SERVER ats | ||
OPTIONS ( | ||
updatable 'false' | ||
); |