- gh-863: Fix yargs warning #864
- gh-754: Allow undefined count #791
- Drop node 10 support #808
- Put migrations table check inside lock #830
- Make the json5 dependency optional (fallback to JSON.parse) #752
- export ConnectionConfig, ClientConfig from pg #657
- Allow expanding dotenv with dotenv-expand #712
- Fix sequence generated #706
- Using string ids for Dollar-string escaping #698
- Handle string params in backward compatible way #696
pgm.sql
can also acceptPgLiteral
,number
,boolean
,null
,array
#695
- PgLiteral can be serialized #678
- Do not try to unlock DB if connection failed #677
- Allow opclass and sort per column in indexes #671
- Update isExternalClient check #664
- Display additional details when logging errors #660
- View options #656
- Fix creating migration #646
- Ability to specify own template file #642
- Fix alter column collation #641
- Keep
this
bind in logger methods #638
-
remove node 8 support #615
-
Ability to use sort of UTC time in filename #622
If you used a different format for migrations names than the default one it can potentially break the order of your migrations
-
Migration can be also symlink #630
If you have symlinks in the migration folder, migration can potentially break
- Fixed position of TEMPORARY clause in create table #629
- add DB env var and tsconfig path to config options #613
- pipe return writeable, should use close event #608
- Fixing default options #601
- Accepting Pool Client #596
reject-unauthorized
CLI option #594
- Command line arguments should override config ones #585
- Support for pg v8 #584
Release with updated dependencies
- Escape BEFORE and AFTER in addTypeValue #554
- Fixing typing of createTrigger parameters #548
- Adding include option for createIndex #537
- Expression generated columns #532
- Allow 'Down' migrations in .sql files #530
- Drop old node support #526
Rewrite in typescript
-
Removed optional dependencies #509
If you are using
config
ordotenv
configuration, it is no longer installed as optional dependency. You have to provide this package yourself. -
Write node-pg-migrate in TypeScript #502 #510 #515 #516 #519 #520 #523
- Fixed some issues with types which did not correspond to how code behave.
functionArgs
in trigger options renamed tofunctionParams
because of consistency.
-
Support for TS migrations #521
- Fixing
createTrigger
TS type #494
- Marking
storageParameters
of materialized view as optional #490
- Fixing constraint name not optional #486
- Decamelize (experimental - it may happen some names are not decamelized) #472
- Fix create constraint by string #482
- Multiple schemas #475
- Constraints - naming and comments #474
- Update template files #473
- Tests for passwords #440, #441, #442
- Drop index when schema and index name is specified #437
- Implement LiteralUnion for Extension #434
- Add ifNotExists to addColumns #427
- Generated option for column #426
- Testing node version 6,8,10,12, postgres 9,10,11, cockroach 1,2 #423
- Do not use alias function name #414
- Returning list of run migrations #411
- Allow user to specify multiple check constraints when creating table #408
- Allow user to pass db client to migration runner #407
- Fix empty migration files #400
- Adding LIKE options when creating table #394
- Infering migration language #391
- Exporting PgType #368
- Pass all params to pg query #361
- Add ForeignKey Reference Action #357
- Shorthand can reference other shorthands #346
- Ability to mark migrations as run #324
- Fix dropping index in another schema #322
- Using default libpq env vars #319
- Do not construct connection string #316
- Removing default value for parallel clause #308
- Fix JSON quotes for script #307
- Renaming of enum values #293
- Update dependencies to enable Greenkeeper #278
- Update CI config #281
- Using async/await #282
- Using 'function' keyword #283
- Using code directly for node >= 8 #288
- Added cockroach v2 to tests #289
- Using tests without babel #291
- Respect configured logger #277
- Added id column to order by clause of select migrations #272
- Adding primary key on pgmigrations table #274
- opclass parens typo #270
- Constraint name is optional (for backward compatibility) #268
- Updated node and service versions #269
!!! Minimal supported node version is now 6 !!!
- Promisifying client.connect #265
- Fix type name issue when the type is not in the default schema #264
- Using dollar-quoted strings in comments #255
- Fixing optional options in create and drop statements #250
- Handling SQL files #246
- Add log option to runner.js #238
- Structuring docs #237
- Prettier formatting #236
- Displaying function name on infer failure #235
- Materialized views handling #234
- Handling Views #233
- Cockroach test #231
- Prettier #230
- Fixing setting comments on columns #228
- Fixing setting comments on columns #228
- Single transaction as default #205
- Versioning type shorthands #190 (type shorthands were moved from global config to migrations scripts)
- Using camel case in API #189
- Removed
pg-migrate
script (usenode-pg-migrate
)
- Running test migrations on CircleCI #221
- Fix runner for zero migrations #224
- Support for policies #219
- Role inherit fix #218
- Exposing DB #212
- Fix auto create schema #206
- Add
--single-transaction
option #204
- Correct handling of multiline constraints #202
- Updating deps, removing vulnerablity status for peer and optional dependencies #199
- Removing regex #198
- Adding ability to specify database name with 'database' option #197
- Passing props #194
- Auto create configured schemas if they don't exist #192
- Add ifNotExists option to create extension #188
- Programmatic API docs #187
- Table and column comments #183
migration-file-language
can be set in config file #180- Treat number argument to up/down migration as timestamp #179
- Fixing addConstraint method with object expression #176
- Remove old version number from index.d.ts #173
- Remove default match in column reference #172
- Refactor code to use camel casing #167
- Deleted duplicate declaration #164
- Updated dependencies #158
- Typescript definition fixes #162
- Uniting drop statements #154
- Handling domains #155
- Operator operations #156
- Sequences operations #157
- Handle rejections in migration actions #148
-
Changed all references from pg-migrate to node-pg-migrate #141
!!! Breaking change from version 3 !!! (now with warning)
- addTypeValue's
after
option is using BEFORE instead of AFTER #133
- Ability to specify files to ignore in migrations directory #131
- If user disables migration, return Error instead of string #125
- Circle CI integration #124
- Moved to Salsita organization #122
- Fixed SQL for dropping multiple columns #120
- Schemas operations #119
- Fixed invalid SQL for table level foreign key #118
- Ability to specify constraints on table level #114
- Fix automatic reversal of addColumns #110
- Fixing referencing column #107
- Formatting changes, added licence #108
- Trigger operations #104
- Support object with schema and table name in more places #105
- Function operations #103
- Support for pg >=4.3.0 <8.0.0
- Interpret only files as migrations in migration directory #101
- Do not check file extension of migration file #93
- Syntax error in node 4
- Down migration when down method is inferred #84
- Enable string functions and arrays as default column values #82
Rewritten using es6 (transpiled via babel) and Promises.
- supports only node >= 4
check-order
flag now defaults totrue
(to switch it off supply--no-check-order
on command line)- dotenv package is
optionalDependency
s
option is now alias forschema
which sets schema for migrations SQL, if you only need to change schema of migrations table use--migrations-schema
- config package as
optionalDependency
- Migration can return
Promise