Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added code 27 :: partitioned found (#18386)
Added tests for singular & multiple partitioned tables
- Loading branch information
Showing
7 changed files
with
473 additions
and
244 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
...te/src/__tests__/fixtures/introspection/postgresql/partitioned-warning-27-1/schema.prisma
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,8 @@ | ||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
datasource db { | ||
provider = "postgres" | ||
url = env("TEST_POSTGRES_URI_MIGRATE") | ||
} |
15 changes: 15 additions & 0 deletions
15
...igrate/src/__tests__/fixtures/introspection/postgresql/partitioned-warning-27-1/setup.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,15 @@ | ||
CREATE TABLE measurement ( | ||
city_id int not null, | ||
logdate date not null, | ||
peaktemp int, | ||
unitsales int | ||
) PARTITION BY RANGE (logdate); | ||
|
||
CREATE TABLE measurement_y2019m01 PARTITION OF measurement | ||
FOR VALUES FROM ('2019-01-01') TO ('2019-02-01'); | ||
|
||
CREATE TABLE measurement_y2019m02 PARTITION OF measurement | ||
FOR VALUES FROM ('2019-02-01') TO ('2019-03-01'); | ||
|
||
CREATE TABLE measurement_y2019m03 PARTITION OF measurement | ||
FOR VALUES FROM ('2019-03-01') TO ('2019-04-01'); |
8 changes: 8 additions & 0 deletions
8
...te/src/__tests__/fixtures/introspection/postgresql/partitioned-warning-27-2/schema.prisma
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,8 @@ | ||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
datasource db { | ||
provider = "postgres" | ||
url = env("TEST_POSTGRES_URI_MIGRATE") | ||
} |
25 changes: 25 additions & 0 deletions
25
...igrate/src/__tests__/fixtures/introspection/postgresql/partitioned-warning-27-2/setup.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,25 @@ | ||
CREATE TABLE measurement ( | ||
city_id int not null, | ||
logdate date not null, | ||
peaktemp int, | ||
unitsales int | ||
) PARTITION BY RANGE (logdate); | ||
|
||
CREATE TABLE measurement_y2019m01 PARTITION OF measurement | ||
FOR VALUES FROM ('2019-01-01') TO ('2019-02-01'); | ||
|
||
CREATE TABLE measurement_y2019m02 PARTITION OF measurement | ||
FOR VALUES FROM ('2019-02-01') TO ('2019-03-01'); | ||
|
||
CREATE TABLE measurement_y2019m03 PARTITION OF measurement | ||
FOR VALUES FROM ('2019-03-01') TO ('2019-04-01'); | ||
|
||
CREATE TABLE definitely_not_measurement ( | ||
city_id int not null, | ||
logdate date not null, | ||
peaktemp int, | ||
unitsales int | ||
) PARTITION BY RANGE (logdate); | ||
|
||
CREATE TABLE definitely_not_measurement_y2019m01 PARTITION OF definitely_not_measurement | ||
FOR VALUES FROM ('2019-01-01') TO ('2019-02-01'); |
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