{"_id":"pg-node-migrations","_rev":"9-0c204c37c5e3faa5f188b39c664a91dc","name":"pg-node-migrations","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.1":{"name":"pg-node-migrations","version":"0.0.1","description":"Based on the work on ThomWright's postgres migration package. Adds the ability to specify a schema and table name.","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Jon Belelieu"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/jbelelieu/pg_node_migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/jbelelieu/pg_node_migrations.git"},"bugs":{"url":"https://github.com/jbelelieu/pg_node_migrations/issues"},"engines":{"node":">10.17.0"},"scripts":{"checkPushed":"[ \"$(git rev-list --count @{upstream}..HEAD)\" -eq 0 ] || (echo You have unpushed commits && exit 1)","prepublishOnly":"npm test && npm run build","check-formatting":"prettier **/*.ts --list-different","fix-formatting":"prettier **/*.ts --write","lint":"npm run tslint","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.cjs","test-unit":"ava --config ava.config.unit.cjs","test":"npm run test-unit && npm run lint","preversion":"npm test","build":"tsc --project tsconfig-build.json"},"husky":{"hooks":{"commit-msg":"node ./node_modules/fit-commit-js/lib/hook.js .git/COMMIT_EDITMSG","pre-commit":"npm run lint","pre-push":"npm test"}},"dependencies":{"pg":"^8.6.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/node":"^10.17.60","@types/pg":"^8.6.0","@types/sinon":"^9.0.11","ava":"^3.15.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.3.1","sinon":"^9.2.4","ts-node":"^10.0.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.3.4","typescript-tslint-plugin":"^1.0.1"},"gitHead":"8cd140bf36fc5d939aad6bee0f0bd083e3904d4c","_id":"pg-node-migrations@0.0.1","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-wgyPcBOfDcINfWmPsUtO9IyMsfvBjEQo6aco4zhZShvTP0XSC2aNyOrYgTdjIdL8eD3mYHprpr30PfxPfCUBUg==","shasum":"cdec14303a620b35890290e045f7597cd9537b4d","tarball":"https://registry.npmjs.org/pg-node-migrations/-/pg-node-migrations-0.0.1.tgz","fileCount":43,"unpackedSize":45185,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHu2ZRNY3ZA/DvalqI2ZU7RZy1hCaTDrq8TUSzKNE4xOAiBGyTO8ljfJJ1kKpgytB+Zn6uX+scDCZS5eth/fT0qDZA=="}]},"_npmUser":{"name":"jbelelieu","email":"withfusion@gmail.com"},"directories":{},"maintainers":[{"name":"jbelelieu","email":"withfusion@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-node-migrations_0.0.1_1632491888922_0.7142511184701461"},"_hasShrinkwrap":false},"0.0.2":{"name":"pg-node-migrations","version":"0.0.2","description":"Based on the work on ThomWright's postgres migration package. Adds the ability to specify a schema and table name.","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Jon Belelieu"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/jbelelieu/pg_node_migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/jbelelieu/pg_node_migrations.git"},"bugs":{"url":"https://github.com/jbelelieu/pg_node_migrations/issues"},"engines":{"node":">10.17.0"},"scripts":{"checkPushed":"[ \"$(git rev-list --count @{upstream}..HEAD)\" -eq 0 ] || (echo You have unpushed commits && exit 1)","prepublishOnly":"npm test && npm run build","check-formatting":"prettier **/*.ts --list-different","fix-formatting":"prettier **/*.ts --write","lint":"npm run tslint","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.cjs","test-unit":"ava --config ava.config.unit.cjs","test":"npm run test-unit && npm run lint","preversion":"npm test","build":"tsc --project tsconfig-build.json && copyfiles ./src/migrations/*.sql ./dist/migrations"},"husky":{"hooks":{"commit-msg":"node ./node_modules/fit-commit-js/lib/hook.js .git/COMMIT_EDITMSG","pre-commit":"npm run lint","pre-push":"npm test"}},"dependencies":{"pg":"^8.6.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/node":"^10.17.60","@types/pg":"^8.6.0","@types/sinon":"^9.0.11","ava":"^3.15.0","copyfiles":"^2.4.1","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.3.1","sinon":"^9.2.4","ts-node":"^10.0.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.3.4","typescript-tslint-plugin":"^1.0.1"},"gitHead":"d112f841663643e3a451667e056cff002b522a61","_id":"pg-node-migrations@0.0.2","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Owb+LImUgxFsbo7feyXxU/UagXpv4DKwsRn9QsaM7LwrcjH4vdAdUd1wKt8jHKBxS2H2nbLeZ/YeeptwK74yFg==","shasum":"a40292bd5f8589378ffa44b6732e105901b70f6b","tarball":"https://registry.npmjs.org/pg-node-migrations/-/pg-node-migrations-0.0.2.tgz","fileCount":44,"unpackedSize":45662,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAnN/CoXDKCzoUk9LuQNOdJcFJ1WoFn3asvlbURwsj7wIgD1Qx1uuFu8/A159a2tNQXq93cqX4y6IqfEXokBTUEFo="}]},"_npmUser":{"name":"jbelelieu","email":"withfusion@gmail.com"},"directories":{},"maintainers":[{"name":"jbelelieu","email":"withfusion@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-node-migrations_0.0.2_1632493482860_0.44794611423353015"},"_hasShrinkwrap":false},"0.0.3":{"name":"pg-node-migrations","version":"0.0.3","description":"Based on the work on ThomWright's postgres migration package. Adds the ability to specify a schema and table name.","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Jon Belelieu"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/jbelelieu/pg_node_migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/jbelelieu/pg_node_migrations.git"},"bugs":{"url":"https://github.com/jbelelieu/pg_node_migrations/issues"},"engines":{"node":">10.17.0"},"scripts":{"checkPushed":"[ \"$(git rev-list --count @{upstream}..HEAD)\" -eq 0 ] || (echo You have unpushed commits && exit 1)","prepublishOnly":"npm test && npm run build","check-formatting":"prettier **/*.ts --list-different","fix-formatting":"prettier **/*.ts --write","lint":"npm run tslint","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.cjs","test-unit":"ava --config ava.config.unit.cjs","test":"npm run test-unit && npm run lint","preversion":"npm test","build":"tsc --project tsconfig-build.json && copyfiles ./src/migrations/*.sql ./dist/migrations"},"husky":{"hooks":{"commit-msg":"node ./node_modules/fit-commit-js/lib/hook.js .git/COMMIT_EDITMSG","pre-commit":"npm run lint","pre-push":"npm test"}},"dependencies":{"pg":"^8.6.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/node":"^10.17.60","@types/pg":"^8.6.0","@types/sinon":"^9.0.11","ava":"^3.15.0","copyfiles":"^2.4.1","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.3.1","sinon":"^9.2.4","ts-node":"^10.0.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.3.4","typescript-tslint-plugin":"^1.0.1"},"gitHead":"371c90631aba1466ebd1207e8051ef41e832ce97","_id":"pg-node-migrations@0.0.3","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-zoBGo/JA9wxJ0igWSMev+UYiVufRv2IWHAtFMqA0Zqb/9pzi5JbTH+zQePVG09Mq3ySu9z9JIUbqQS2GdaxXQg==","shasum":"40f14ddc2470364196cf3f1fe214bb23404673e4","tarball":"https://registry.npmjs.org/pg-node-migrations/-/pg-node-migrations-0.0.3.tgz","fileCount":44,"unpackedSize":45660,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzUUbcJLmRgAnZ+D39vvdHaDJTx5LWEWOuz3pjXflMCQIgL6xZmORzZOdfvKMXNsNXDb/OdSZm1CBvBBcxIpfmVYw="}]},"_npmUser":{"name":"jbelelieu","email":"withfusion@gmail.com"},"directories":{},"maintainers":[{"name":"jbelelieu","email":"withfusion@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-node-migrations_0.0.3_1632494313764_0.8629626350963433"},"_hasShrinkwrap":false},"0.0.4":{"name":"pg-node-migrations","version":"0.0.4","description":"Based on the work on ThomWright's postgres migration package. Adds the ability to specify a schema and table name.","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Jon Belelieu"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/jbelelieu/pg_node_migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/jbelelieu/pg_node_migrations.git"},"bugs":{"url":"https://github.com/jbelelieu/pg_node_migrations/issues"},"engines":{"node":">10.17.0"},"scripts":{"checkPushed":"[ \"$(git rev-list --count @{upstream}..HEAD)\" -eq 0 ] || (echo You have unpushed commits && exit 1)","prepublishOnly":"npm test && npm run build","check-formatting":"prettier **/*.ts --list-different","fix-formatting":"prettier **/*.ts --write","lint":"npm run tslint","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.cjs","test-unit":"ava --config ava.config.unit.cjs","test":"npm run test-unit && npm run lint","preversion":"npm test","build":"tsc --project tsconfig-build.json && copyfiles ./src/migrations/*.sql ./dist/migrations"},"husky":{"hooks":{"commit-msg":"node ./node_modules/fit-commit-js/lib/hook.js .git/COMMIT_EDITMSG","pre-commit":"npm run lint","pre-push":"npm test"}},"dependencies":{"pg":"^8.6.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/node":"^10.17.60","@types/pg":"^8.6.0","@types/sinon":"^9.0.11","ava":"^3.15.0","copyfiles":"^2.4.1","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.3.1","sinon":"^9.2.4","ts-node":"^10.0.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.3.4","typescript-tslint-plugin":"^1.0.1"},"gitHead":"6085df7e0f12a774649eeb21f00ea9c4e9478c11","_id":"pg-node-migrations@0.0.4","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-s/jxnktlrjskJwusITOZ29GfAE8wC5N9gr357XZUFkU4GmKbFCbpfk2F5Vk+ih4WNysmdMH8GrAy15lW/KLf8g==","shasum":"5905e1d197061385cf82fdeb394fbe70ccb78aa4","tarball":"https://registry.npmjs.org/pg-node-migrations/-/pg-node-migrations-0.0.4.tgz","fileCount":44,"unpackedSize":45955,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFx5ITFl4mZ94cN+gav9WkwPDxABe27qj8kzll46YOLuAiAeOxJVj/ceg/UAj6g64zau4QoeJlamtYNI15vPKsxi8Q=="}]},"_npmUser":{"name":"jbelelieu","email":"withfusion@gmail.com"},"directories":{},"maintainers":[{"name":"jbelelieu","email":"withfusion@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-node-migrations_0.0.4_1632494955682_0.612208751944175"},"_hasShrinkwrap":false},"0.0.5":{"name":"pg-node-migrations","version":"0.0.5","description":"Based on the work on ThomWright's postgres migration package. Adds the ability to specify a schema and table name.","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Jon Belelieu"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/jbelelieu/pg_node_migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/jbelelieu/pg_node_migrations.git"},"bugs":{"url":"https://github.com/jbelelieu/pg_node_migrations/issues"},"engines":{"node":">10.17.0"},"scripts":{"checkPushed":"[ \"$(git rev-list --count @{upstream}..HEAD)\" -eq 0 ] || (echo You have unpushed commits && exit 1)","prepublishOnly":"npm test && npm run build","check-formatting":"prettier **/*.ts --list-different","fix-formatting":"prettier **/*.ts --write","lint":"npm run tslint","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.cjs","test-unit":"ava --config ava.config.unit.cjs","test":"npm run test-unit && npm run lint","preversion":"npm test","build":"tsc --project tsconfig-build.json"},"husky":{"hooks":{"commit-msg":"node ./node_modules/fit-commit-js/lib/hook.js .git/COMMIT_EDITMSG","pre-commit":"npm run lint","pre-push":"npm test"}},"dependencies":{"pg":"^8.6.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/node":"^10.17.60","@types/pg":"^8.6.0","@types/sinon":"^9.0.11","ava":"^3.15.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.3.1","sinon":"^9.2.4","ts-node":"^10.0.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.3.4","typescript-tslint-plugin":"^1.0.1"},"gitHead":"1650d55b35bc6c49f5ec2a06caff4ea812a4b508","_id":"pg-node-migrations@0.0.5","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ALe1AGR455PUf7aPo0iVZAaY9Ph4ccX2v9oodAvuCu89+CxxZ1ovcx0CUCb5jsLEX1GYzUxLv152cY466JKvmg==","shasum":"32819e08dd7926e4acd9e8d3989f42085ac37133","tarball":"https://registry.npmjs.org/pg-node-migrations/-/pg-node-migrations-0.0.5.tgz","fileCount":44,"unpackedSize":45873,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZdLsWY9JtL4IxodMSJjwEoaS5oSQGv4tb+yvXQrqvGAiEAyAdvbGkkHv42NkyOyK9JUvOVifzjTujzzDEiJI2RCeo="}]},"_npmUser":{"name":"jbelelieu","email":"withfusion@gmail.com"},"directories":{},"maintainers":[{"name":"jbelelieu","email":"withfusion@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-node-migrations_0.0.5_1632495035339_0.5388839682520816"},"_hasShrinkwrap":false},"0.0.6":{"name":"pg-node-migrations","version":"0.0.6","description":"Based on the work on ThomWright's postgres migration package. Adds the ability to specify a schema and table name.","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Jon Belelieu"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/jbelelieu/pg_node_migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/jbelelieu/pg_node_migrations.git"},"bugs":{"url":"https://github.com/jbelelieu/pg_node_migrations/issues"},"engines":{"node":">10.17.0"},"scripts":{"checkPushed":"[ \"$(git rev-list --count @{upstream}..HEAD)\" -eq 0 ] || (echo You have unpushed commits && exit 1)","prepublishOnly":"npm test && npm run build","check-formatting":"prettier **/*.ts --list-different","fix-formatting":"prettier **/*.ts --write","lint":"npm run tslint","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.cjs","test-unit":"ava --config ava.config.unit.cjs","test":"npm run test-unit && npm run lint","preversion":"npm test","build":"tsc --project tsconfig-build.json"},"husky":{"hooks":{"commit-msg":"node ./node_modules/fit-commit-js/lib/hook.js .git/COMMIT_EDITMSG","pre-commit":"npm run lint","pre-push":"npm test"}},"dependencies":{"pg":"^8.6.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/node":"^10.17.60","@types/pg":"^8.6.0","@types/sinon":"^9.0.11","ava":"^3.15.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.3.1","sinon":"^9.2.4","ts-node":"^10.0.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.3.4","typescript-tslint-plugin":"^1.0.1"},"gitHead":"755c6e8d04d262ba15fccbec8b48adffb174a495","_id":"pg-node-migrations@0.0.6","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-H+RSs80E3LeHwz5ICxv5FXQW3N7usuuIHzkGM+eRvE9nBjxEvm41m9v7rFBMhpicm3L3L0qiLNuXUjT2qLoEXw==","shasum":"005844d30f949b6d5ed8920f0f21179d968e0943","tarball":"https://registry.npmjs.org/pg-node-migrations/-/pg-node-migrations-0.0.6.tgz","fileCount":44,"unpackedSize":45918,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEXoYACbjz4mmWCNxOpwpEft3RVVLL9FpMvn8V/e5w15AiBOKjBpmCiJqEvPVF8Jbi70297eDCap7ArlMvTNp3XreA=="}]},"_npmUser":{"name":"jbelelieu","email":"withfusion@gmail.com"},"directories":{},"maintainers":[{"name":"jbelelieu","email":"withfusion@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-node-migrations_0.0.6_1632495493045_0.608240005190217"},"_hasShrinkwrap":false},"0.0.7":{"name":"pg-node-migrations","version":"0.0.7","description":"Based on the work on ThomWright's postgres migration package. Adds the ability to specify a schema and table name.","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Jon Belelieu"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/jbelelieu/pg_node_migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/jbelelieu/pg_node_migrations.git"},"bugs":{"url":"https://github.com/jbelelieu/pg_node_migrations/issues"},"engines":{"node":">10.17.0"},"scripts":{"checkPushed":"[ \"$(git rev-list --count @{upstream}..HEAD)\" -eq 0 ] || (echo You have unpushed commits && exit 1)","prepublishOnly":"npm test && npm run build","check-formatting":"prettier **/*.ts --list-different","fix-formatting":"prettier **/*.ts --write","lint":"npm run tslint","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.cjs","test-unit":"ava --config ava.config.unit.cjs","test":"npm run test-unit && npm run lint","preversion":"npm test","build":"tsc --project tsconfig-build.json"},"husky":{"hooks":{"commit-msg":"node ./node_modules/fit-commit-js/lib/hook.js .git/COMMIT_EDITMSG","pre-commit":"npm run lint","pre-push":"npm test"}},"dependencies":{"pg":"^8.6.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/node":"^10.17.60","@types/pg":"^8.6.0","@types/sinon":"^9.0.11","ava":"^3.15.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.3.1","sinon":"^9.2.4","ts-node":"^10.0.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.3.4","typescript-tslint-plugin":"^1.0.1"},"gitHead":"c430fd9d9289e0fd2fa39a4966e20b55bf15bb3e","_id":"pg-node-migrations@0.0.7","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-imw6BlHt5Y0wE7uvK5HXcPFoGFymPOpDJQQHTfbxE1vIR4ScjT8r9BwU/CHjxzBtNgVjlmo9thljPXxrT8bxsw==","shasum":"b65e95405a8e986b06cbca37522194c546256038","tarball":"https://registry.npmjs.org/pg-node-migrations/-/pg-node-migrations-0.0.7.tgz","fileCount":44,"unpackedSize":45904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh22iaCRA9TVsSAnZWagAADoAP/RTmIDWbVN7qPjBEj+7E\nNKooFUhj3b/P76UQq9JUnUvaEM3QEo9vyThy1Y2j90NxMrHR2bSEbO6WE0Js\nspHAhmz2z6VBgmxOpiX8plJ42ZUJttkL/6qHVSL27lzyoztCmCyESHIHugPi\nhDMPyXbz2sN0lkSamHYV8R8aISb2Jb3Nd5h0ISKtIDcN7eHOd5zfNeTIZysd\nvU4C29pKJeXX5Kwc/VigbWh64/SybV4m88r3Mxb5Rnh7IxrvwvPgDIIloFJM\ntzQjFt6SYssMRfwwTOenTPbMUMHJj4NN6W/EAFRY7uPsPlESgy13CK1GsOv7\n78wzWVlPEnwcQCOO1V89GVqnuaCwCFCtQYnwHUL+2ncHFpcdwORJBlebnGvN\nQi530aDoDc8tKXcMR5ikq+Q5kNiEmvyvYlFwSOiVoqMChOYHUo+1Ozh+jXRR\nsxzQmtopwDRlBucnaaz444O2q0LqzqJN2zr9/tdxbwhAOqi8QZbElOPyf3os\naqejmgmU1wDFoG13p3y1UV5r254UF877f1OD0eljDLvBt9/qwXlM6Ca8CBgy\n5hNA+rtq3P63ikbyoStlTeB+ISMKFZMgbUugiyIdHrNzNC1O7uCrEdlUgc23\nCpoeqGiJR+B/xkxo6AfYJf5uQ2Q+iDRpLUj6hqwxMfgRMXnIGesDeFwyIGIJ\nzbXp\r\n=UHe9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFe3T7yATukZdeeRAvMdvaTFLTpJeoSjdwNMd8HeLQ1IAiEAvcpue5MlYdkjROtEPRcuzTrtpI8m9JWZrMg9sstSkRk="}]},"_npmUser":{"name":"jbelelieu","email":"withfusion@gmail.com"},"directories":{},"maintainers":[{"name":"jbelelieu","email":"withfusion@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-node-migrations_0.0.7_1632497985926_0.631093322813558"},"_hasShrinkwrap":false},"0.0.8":{"name":"pg-node-migrations","version":"0.0.8","description":"Based on the work on ThomWright's postgres migration package. Adds the ability to specify a schema and table name.","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Jon Belelieu"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/jbelelieu/pg_node_migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/jbelelieu/pg_node_migrations.git"},"bugs":{"url":"https://github.com/jbelelieu/pg_node_migrations/issues"},"engines":{"node":">10.17.0"},"scripts":{"checkPushed":"[ \"$(git rev-list --count @{upstream}..HEAD)\" -eq 0 ] || (echo You have unpushed commits && exit 1)","prepublishOnly":"npm run build","check-formatting":"prettier **/*.ts --list-different","fix-formatting":"prettier **/*.ts --write","lint":"npm run tslint","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.cjs","test-unit":"ava --config ava.config.unit.cjs","test":"npm run test-unit && npm run lint","preversion":"npm test","build":"tsc --project tsconfig-build.json"},"husky":{"hooks":{"commit-msg":"node ./node_modules/fit-commit-js/lib/hook.js .git/COMMIT_EDITMSG","pre-commit":"npm run lint","pre-push":"npm test"}},"dependencies":{"pg":"^8.6.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/node":"^10.17.60","@types/pg":"^8.6.0","@types/sinon":"^9.0.11","ava":"^3.15.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.3.1","sinon":"^9.2.4","ts-node":"^10.0.0","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.3.4","typescript-tslint-plugin":"^1.0.1"},"gitHead":"bcbad9db1d389139b00e7e1c195ca6680b7f4d32","_id":"pg-node-migrations@0.0.8","_nodeVersion":"17.3.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-44cMl9umOmCv0hzZyEcvjEq8Bm8u7mrzggZ06qXTJVSsMMB4j2OsjG+rSp+uzeKWyP2Vu0K9Ye2wKtjFUJwrdw==","shasum":"e7014e877fe976bccfd6f6137fdef6bd39acee03","tarball":"https://registry.npmjs.org/pg-node-migrations/-/pg-node-migrations-0.0.8.tgz","fileCount":43,"unpackedSize":45245,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAPeKQ8ykMUvrzwh+tGvlXCiXFDJb4VX5+1+KBFzLU/sAiEArxCxIGZ75PUhXM2WHFrdoH10NvdVbal5tsiBbw6OCys="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXtt4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr38g//cmU7U5NXI4i3ni/OdNxee2+iu0hHFH/dsfF44BpSt2cKcMu6\r\nI8pPWXgV9IMN7Y+2x/nh7N/JJYcwdibD3ygnNos3J4OpBXgLhg1ZlTJxf8z2\r\nG4TvWbPkUurNI6CWqhIPTn1aarGqbrflRbZNEvECg9DGLzKqpPglqu9X8wZT\r\nJna5W4fWJcFAMAFj/WoC4QKbFnVHUdC5Xyyogx+ks7YaZrLXyqqmqbjS0pzZ\r\ncgFN3GopoKTILM/FDj41ZVL0zYmdamETQoJWSMRGrkls0p0Hu5b+PDOiuZRd\r\nEdlE7c6yTUDBBHN8AvTP/DIDXHhidtViGAGRtp74d4wWrScVv0h7OC936m4m\r\n5vTwJyKWqHor+XwLe4wYMf9SST/6DCpjqZOHBgxE1NxfZL85D5qxnFzA74Bd\r\ndHIR+4o0PugeZJsLKl/r9qsd8e8/WjXg1XD7n8tfTdk6370kzhTrtdaa3+g+\r\n5BoxzXRyRbZAb0TVeKoNDkt/C6kfKuUJEj3L5NlnfANlsD03WJQQ6xLo/xXj\r\nExGi1urRP2df5DzhbwISi2EBiT0BjNvNQfTzRyw/ZVI/CDIzMMqfSaRjGq0s\r\n2hKXRWtLdfuDj4z5pHWeBFvkeefiobD9kUapIckvXt8pWw7Lsipv06kspb3W\r\nOb+iPcayHZrIymKiX/yiPY8RWJ9oSGCxUSg=\r\n=o4Sh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jbelelieu","email":"withfusion@gmail.com"},"directories":{},"maintainers":[{"name":"jbelelieu","email":"withfusion@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-node-migrations_0.0.8_1650383736369_0.5150451811630306"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-24T13:58:08.920Z","0.0.1":"2021-09-24T13:58:09.099Z","modified":"2022-05-12T20:30:25.952Z","0.0.2":"2021-09-24T14:24:42.982Z","0.0.3":"2021-09-24T14:38:33.919Z","0.0.4":"2021-09-24T14:49:15.820Z","0.0.5":"2021-09-24T14:50:35.472Z","0.0.6":"2021-09-24T14:58:13.178Z","0.0.7":"2021-09-24T15:39:46.094Z","0.0.8":"2022-04-19T15:55:36.543Z"},"maintainers":[{"name":"jbelelieu","email":"withfusion@gmail.com"}],"description":"Based on the work on ThomWright's postgres migration package. Adds the ability to specify a schema and table name.","homepage":"https://github.com/jbelelieu/pg_node_migrations#readme","keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"repository":{"type":"git","url":"git+ssh://git@github.com/jbelelieu/pg_node_migrations.git"},"author":{"name":"Jon Belelieu"},"bugs":{"url":"https://github.com/jbelelieu/pg_node_migrations/issues"},"license":"MIT","readme":"This repo is based off of the work of [Thom Wright's Postgres migrations library](https://github.com/ThomWright/postgres-migrations). The only differences are:\n1. You can specify a migration table name,\n2. You can specify a schema to run the migrations against.\n\n# Postgres migrations\n\n![GitHub Actions](https://github.com/ThomWright/postgres-migrations/actions/workflows/node.js.yml/badge.svg)\n[![npm](https://img.shields.io/npm/v/postgres-migrations.svg)](https://www.npmjs.com/package/postgres-migrations)\n[![David](https://img.shields.io/david/ThomWright/postgres-migrations.svg)](https://david-dm.org/ThomWright/postgres-migrations)\n[![David](https://img.shields.io/david/dev/ThomWright/postgres-migrations.svg)](https://david-dm.org/ThomWright/postgres-migrations)\n\nA PostgreSQL migration library inspired by the Stack Overflow system described in [Nick Craver's blog](http://nickcraver.com/blog/2016/05/03/stack-overflow-how-we-do-deployment-2016-edition/#database-migrations).\n\nMigrations are defined in sequential SQL files, for example:\n\n**IMPORTANT: Start your migrations at 0_**\n\n```text\nmigrations\n├ 0_create-table.sql\n├ 1_alter-table.sql\n└ 2_add-index.sql\n```\n\nRequires Node 10.17.0+\n\nSupports PostgreSQL 9.4+\n\n## API\n\nThere are two ways to use the API.\n\nEither, pass a database connection config object:\n\n```typescript\nimport {migrate} from \"pg-node-migrations\"\n\nasync function() {\n  const dbConfig = {\n    database: \"database-name\",\n    user: \"postgres\",\n    password: \"password\",\n    host: \"localhost\",\n    port: 5432,\n\n    // Default: false for backwards-compatibility\n    // This might change!\n    ensureDatabaseExists: true,\n\n    // Default: \"postgres\"\n    // Used when checking/creating \"database-name\"\n    defaultDatabase: \"postgres\"\n  }\n\n  // Optional. Defaults to \"public\" schema and \"migrations\" table\n  const optionalConfig = {\n    schemaName: 'myCustomSchema',\n    tableName: 'myCustomMigrationsTableName',\n  }\n\n  await migrate(dbConfig, \"path/to/migration/files\", optionalConfig)\n}\n```\n\nOr, pass a `pg` client:\n\n```typescript\nimport {migrate} from \"pg-node-migrations\"\n\nasync function() {\n  const dbConfig = {\n    database: \"database-name\",\n    user: \"postgres\",\n    password: \"password\",\n    host: \"localhost\",\n    port: 5432,\n  }\n\n  // Optional. Defaults to \"public\" schema and \"migrations\" table\n  const optionalConfig = {\n    schemaName: 'myCustomSchema',\n    tableName: 'myCustomMigrationsTableName',\n  }\n\n  // Note: when passing a client, it is assumed that the database already exists\n  const client = new pg.Client(dbConfig) // or a Pool, or a PoolClient\n  await client.connect()\n  try {\n    await migrate({client}, \"path/to/migration/files\", optionalConfig)\n  } finally {\n    await client.end()\n  }\n}\n```\n\n### Validating migration files\n\nOccasionally, if two people are working on the same codebase independently, they might both create a migration at the same time. For example, `5_add-table.sql` and `5_add-column.sql`. If these both get pushed, there will be a conflict.\n\nWhile the migration system will notice this and refuse to apply the migrations, it can be useful to catch this as early as possible.\n\nThe `loadMigrationFiles` function can be used to check if the migration files satisfy the rules.\n\nAlternatively, use the `pg-validate-migrations` bin script: `pg-validate-migrations \"path/to/migration/files\"`.\n\n## Design decisions\n\n### No down migrations\n\nThere is deliberately no concept of a 'down' migration. In the words of Nick Craver:\n\n> If we needed to reverse something, we could just push another migration negating whatever we did that went boom ... Why roll back when you can roll forward?\n\n### Simple ordering\n\nMigrations are guaranteed to run in the same order every time, on every system.\n\nSome migration systems use timestamps for ordering migrations, where the timestamp represents when the migration file was created. This doesn't guarantee that the migrations will be run in the same order on every system.\n\nFor example, imagine Developer A creates a migration file in a branch. The next day, Developer B creates a migration in master, and deploys it to production. On day three Developer A merges in their branch and deploys to production.\n\nThe production database sees the migrations applied out of order with respect to their creation time. Any new development database will run the migrations in the timestamp order.\n\n### The `migrations` table\n\nA `migrations` table is created as the first migration, before any user-supplied migrations. This keeps track of all the migrations which have already been run.\n\n### Hash checks for previous migrations\n\nPreviously run migration scripts shouldn't be modified, since we want the process to be repeated in the same way for every new environment.\n\nThis is enforced by hashing the file contents of a migration script and storing this in `migrations` table. Before running a migration, the previously run scripts are hashed and checked against the database to ensure they haven't changed.\n\n### Each migration runs in a transaction\n\nRunning in a transaction ensures each migration is atomic. Either it completes successfully, or it is rolled back and the process is aborted.\n\nAn exception is made when `-- postgres-migrations disable-transaction` is included at the top of the migration file. This allows migrations such as `CREATE INDEX CONCURRENTLY` which cannot be run inside a transaction.\n\n### Abort on errors\n\nIf anything fails, the migration in progress is rolled back and an exception is thrown.\n\n## Concurrency\n\nAs of v4, [advisory locks](https://www.postgresql.org/docs/9.4/explicit-locking.html#ADVISORY-LOCKS) are used to control concurrency. If two migration runs are kicked off concurrently, one will wait for the other to finish before starting. Once a process has acquired a lock, it will run each of the pending migrations before releasing the lock again.\n\nLogs from two processes `A` and `B` running concurrently should look something like the following.\n\n```text\nB Connected to database\nB Acquiring advisory lock...\nA Connected to database\nA Acquiring advisory lock...\nB ... acquired advisory lock\nB Starting migrations\nB Starting migration: 2 migration-name\nB Finished migration: 2 migration-name\nB Starting migration: 3 another-migration-name\nB Finished migration: 3 another-migration-name\nB Successfully applied migrations: migration-name, another-migration-name\nB Finished migrations\nB Releasing advisory lock...\nB ... released advisory lock\nA ... acquired advisory lock\nA Starting migrations\nA No migrations applied\nA Finished migrations\nA Releasing advisory lock...\nA ... released advisory lock\n```\n\nWarning: the use of advisory locks will cause problems when using [transaction pooling or statement pooling in PgBouncer](http://www.pgbouncer.org/features.html). A similar system is used in Rails, [see this for an explanation of the problem](https://blog.saeloun.com/2019/09/09/rails-6-disable-advisory-locks.html).\n\n## Migration rules\n\n### Make migrations idempotent\n\nMigrations should only be run once, but this is a good principle to follow regardless.\n\n### Migrations are immutable\n\nOnce applied (to production), a migration cannot be changed.\n\nThis is enforced by storing a hash of the file contents for each migration in the migrations table.\n\nThese hashes are checked when running migrations.\n\n### Migrations should be backwards compatible\n\nBackwards incompatible changes can usually be made in a few stages.\n\nFor an example, see [this blog post](http://www.brunton-spall.co.uk/post/2014/05/06/database-migrations-done-right/).\n\n### File name\n\nA migration file must match the following pattern:\n\n`[id][separator][name][extension]`\n\n| Section   | Accepted Values                   | Description                                                                                                                      |\n| --------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| id        | Any integer or left zero integers | Consecutive integer ID. <br />**Must start from 1 and be consecutive, e.g. if you have migrations 1-4, the next one must be 5.** |\n| separator | `_` or `-` or nothing             |                                                                                                                                  |\n| name      | Any length text                   |                                                                                                                                  |\n| extension | `.sql` or `.js`                   | File extensions supported. **Case insensitive.**                                                                                 |\n\nExample:\n\n```text\nmigrations\n├ 1_create-initial-tables.sql\n├ 1_create-initial-tables.md # Docs can go here\n├ 2-alter-initial-tables.SQL\n└ 3-alter-initial-tables-again.js\n```\n\nOr, if you want better ordering in your filesystem:\n\n```text\nmigrations\n├ 00001_create-initial-tables.sql\n├ 00001_create-initial-tables.md # Docs can go here\n├ 00002-alter-initial-tables.sql\n└ 00003_alter-initial-tables-again.js\n```\n\nMigrations will be performed in the order of the ids. If ids are not consecutive or if multiple migrations have the same id, the migration run will fail.\n\nNote that file names cannot be changed later.\n\n### Javascript Migrations\n\nBy using `.js` extension on your migration file you gain access to all NodeJS features and only need to export a method called `generateSql` that returns a `string` literal like:\n\n```js\n// ./migrations/helpers/create-main-table.js\nmodule.exports = `\nCREATE TABLE main (\n    id int primary key\n);`\n\n// ./migrations/helpers/create-secondary-table.js\nmodule.exports = `\nCREATE TABLE secondary (\n    id int primary key\n);`\n\n// ./migrations/1-init.js\nconst createMainTable = require(\"./create-main-table\")\nconst createSecondaryTable = require(\"./create-secondary-table\")\n\nmodule.exports.generateSql = () => `${createMainTable}\n${createSecondaryTable}`\n```\n\n## Tips\n\nIf you want sane date handling, it is recommended you use the following code snippet to fix a `node-postgres` [bug](https://github.com/brianc/node-postgres/issues/818):\n\n```js\nconst pg = require(\"pg\")\n\nconst parseDate = (val) =>\n  val === null ? null : moment(val).format(\"YYYY-MM-DD\")\nconst DATATYPE_DATE = 1082\npg.types.setTypeParser(DATATYPE_DATE, (val) => {\n  return val === null ? null : parseDate(val)\n})\n```\n\n## Useful resources\n\n[Stack Overflow: How We Do Deployment - 2016 Edition (Database Migrations)](http://nickcraver.com/blog/2016/05/03/stack-overflow-how-we-do-deployment-2016-edition/#database-migrations)\n\n[Database Migrations Done Right](http://www.brunton-spall.co.uk/post/2014/05/06/database-migrations-done-right/)\n\n[Database versioning best practices](http://enterprisecraftsmanship.com/2015/08/10/database-versioning-best-practices/)\n\n## Developing `postgres-migrations`\n\nThe tests require Docker to be installed. It probably helps to `docker pull postgres:9.4`.\n","readmeFilename":"README.md"}