Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(schema): do not create indexes for each composite PK
Closes: #760
- Loading branch information
Showing
8 changed files
with
210 additions
and
216 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`GH issue 529 GH issue 760 1`] = ` | ||
"set names 'utf8'; | ||
set session_replication_role = 'replica'; | ||
create table \\"product\\" (\\"id\\" serial primary key, \\"name\\" varchar(255) not null, \\"current_price\\" int4 not null); | ||
create table \\"customer\\" (\\"id\\" serial primary key); | ||
create table \\"order\\" (\\"id\\" serial primary key, \\"customer_id\\" int4 not null, \\"paid\\" jsonb not null, \\"shipped\\" jsonb not null, \\"created\\" timestamptz(0) not null); | ||
create table \\"order_item\\" (\\"order_id\\" int4 not null, \\"product_id\\" int4 not null, \\"amount\\" int4 not null, \\"offered_price\\" int4 not null); | ||
alter table \\"order_item\\" add constraint \\"order_item_pkey\\" primary key (\\"order_id\\", \\"product_id\\"); | ||
alter table \\"order\\" add constraint \\"order_customer_id_foreign\\" foreign key (\\"customer_id\\") references \\"customer\\" (\\"id\\") on update cascade; | ||
alter table \\"order_item\\" add constraint \\"order_item_order_id_foreign\\" foreign key (\\"order_id\\") references \\"order\\" (\\"id\\") on update cascade; | ||
alter table \\"order_item\\" add constraint \\"order_item_product_id_foreign\\" foreign key (\\"product_id\\") references \\"product\\" (\\"id\\") on update cascade; | ||
set session_replication_role = 'origin'; | ||
" | ||
`; |
Oops, something went wrong.