Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows-src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ export default createWorkflow(({setWorkflowName, addTrigger, addJob}) => {
'11.9-alpine',
'12.4-alpine',
'13.0-alpine',
'14.9-alpine',
'15.8-alpine',
'16.4-alpine',
],
},
{failFast: false},
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ jobs:
- 11.9-alpine
- 12.4-alpine
- 13.0-alpine
- 14.9-alpine
- 15.8-alpine
- 16.4-alpine
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand Down
151 changes: 139 additions & 12 deletions packages/pg-data-type-id/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ enum PgDataTypeID {
*/
_date = 1182,

/**
* Array<datemultirange>
*/
_datemultirange = 6155,

/**
* Array<daterange>
*/
Expand Down Expand Up @@ -108,6 +113,11 @@ enum PgDataTypeID {
*/
_int4 = 1007,

/**
* Array<int4multirange>
*/
_int4multirange = 6150,

/**
* Array<int4range>
*/
Expand All @@ -118,6 +128,11 @@ enum PgDataTypeID {
*/
_int8 = 1016,

/**
* Array<int8multirange>
*/
_int8multirange = 6157,

/**
* Array<int8range>
*/
Expand Down Expand Up @@ -178,6 +193,11 @@ enum PgDataTypeID {
*/
_numeric = 1231,

/**
* Array<nummultirange>
*/
_nummultirange = 6151,

/**
* Array<numrange>
*/
Expand All @@ -198,16 +218,61 @@ enum PgDataTypeID {
*/
_path = 1019,

/**
* Array<pg_attribute>
*/
_pg_attribute = 270,

/**
* Array<pg_class>
*/
_pg_class = 273,

/**
* Array<pg_ident_file_mappings>
*/
_pg_ident_file_mappings = 12119,

/**
* Array<pg_lsn>
*/
_pg_lsn = 3221,

/**
* Array<pg_parameter_acl>
*/
_pg_parameter_acl = 10096,

/**
* Array<pg_proc>
*/
_pg_proc = 272,

/**
* Array<pg_publication_namespace>
*/
_pg_publication_namespace = 10108,

/**
* Array<pg_snapshot>
*/
_pg_snapshot = 5039,

/**
* Array<pg_stat_io>
*/
_pg_stat_io = 12294,

/**
* Array<pg_stat_recovery_prefetch>
*/
_pg_stat_recovery_prefetch = 12241,

/**
* Array<pg_type>
*/
_pg_type = 210,

/**
* Array<point>
*/
Expand Down Expand Up @@ -318,6 +383,11 @@ enum PgDataTypeID {
*/
_tinterval = 1025,

/**
* Array<tsmultirange>
*/
_tsmultirange = 6152,

/**
* Array<tsquery>
*/
Expand All @@ -328,6 +398,11 @@ enum PgDataTypeID {
*/
_tsrange = 3909,

/**
* Array<tstzmultirange>
*/
_tstzmultirange = 6153,

/**
* Array<tstzrange>
*/
Expand Down Expand Up @@ -411,6 +486,11 @@ enum PgDataTypeID {
*/
anycompatiblearray = 5078,

/**
* pseudo-type representing a multirange over a polymorphic common type
*/
anycompatiblemultirange = 4538,

/**
* pseudo-type representing a polymorphic common type that is not an array
*/
Expand All @@ -431,6 +511,11 @@ enum PgDataTypeID {
*/
anyenum = 3500,

/**
* pseudo-type representing a polymorphic base type that is a multirange
*/
anymultirange = 4537,

/**
* pseudo-type representing a polymorphic base type that is not an array
*/
Expand Down Expand Up @@ -705,15 +790,37 @@ enum PgDataTypeID {
*/
bpchar = 1042,

/**
* 63-byte type for storing system identifiers
*/
name = 19,

/**
* variable-length string, no limit specified
*/
text = 25,

/**
* varchar(length), non-blank-padded string, variable storage length
*/
varchar = 1043,

// === Char ===

/**
* single character
*/
char = 18,

/**
* 63-byte type for storing system identifiers
* BRIN bloom summary
*/
name = 19,
pg_brin_bloom_summary = 4600,

/**
* BRIN minmax-multi summary
*/
pg_brin_minmax_multi_summary = 4601,

/**
* multivariate dependencies
Expand All @@ -735,16 +842,6 @@ enum PgDataTypeID {
*/
pg_node_tree = 194,

/**
* variable-length string, no limit specified
*/
text = 25,

/**
* varchar(length), non-blank-padded string, variable storage length
*/
varchar = 1043,

// === NetworkAddress ===

/**
Expand All @@ -759,31 +856,61 @@ enum PgDataTypeID {

// === Range ===

/**
* multirange of dates
*/
datemultirange = 4535,

/**
* range of dates
*/
daterange = 3912,

/**
* multirange of integers
*/
int4multirange = 4451,

/**
* range of integers
*/
int4range = 3904,

/**
* multirange of bigints
*/
int8multirange = 4536,

/**
* range of bigints
*/
int8range = 3926,

/**
* multirange of numerics
*/
nummultirange = 4532,

/**
* range of numerics
*/
numrange = 3906,

/**
* multirange of timestamps without time zone
*/
tsmultirange = 4533,

/**
* range of timestamps without time zone
*/
tsrange = 3908,

/**
* multirange of timestamps with time zone
*/
tstzmultirange = 4534,

/**
* range of timestamps with time zone
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@

exports[`apply - after already appying 1`] = `
"stdout:
No migrations required
Applying 00001-init.ts

stderr:
error: relation \\"users\\" already exists
at handleError (/Users/forbeslindesay/Documents/GitHub/atdatabases/packages/pg/lib/Driver.js:397:29)
at executeQueryInternal (/Users/forbeslindesay/Documents/GitHub/atdatabases/packages/pg/lib/Driver.js:369:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PgDriver._executeQuery (/Users/forbeslindesay/Documents/GitHub/atdatabases/packages/pg/lib/Driver.js:199:29)
at async PgDriver.executeAndReturnLast (/Users/forbeslindesay/Documents/GitHub/atdatabases/packages/pg/lib/Driver.js:224:13)
at async Transaction.query (/Users/forbeslindesay/Documents/GitHub/atdatabases/packages/shared/lib/BaseTransaction.js:59:24)
at async applyMigration (/Users/forbeslindesay/Documents/GitHub/atdatabases/packages/pg-migrations/src/__tests__/migrations/00001-init.ts:4:3)
at async Object.applyMigration (/Users/forbeslindesay/Documents/GitHub/atdatabases/packages/pg-migrations/lib/PostgresDatabaseEngine.js:137:21)
at async /Users/forbeslindesay/Documents/GitHub/atdatabases/packages/migrations-base/lib/methods/applyOperations.js:43:29
at async /Users/forbeslindesay/Documents/GitHub/atdatabases/packages/pg-migrations/lib/PostgresDatabaseEngine.js:54:20
"
`;

Expand All @@ -22,7 +33,13 @@ stderr:

exports[`apply --dry-run - after already appying 1`] = `
"stdout:
No migrations required
Applying 00001-init.ts (dry run only)
Applied 00001-init.ts (dry run only, not actually applied)
Applying 00002-update.ts (dry run only)
Applied 00002-update.ts (dry run only, not actually applied)
Applying 00003-update2.sql (dry run only)
Applied 00003-update2.sql (dry run only, not actually applied)
To apply 3 migrations, run again without --dry-run

stderr:
"
Expand Down
Loading