{"_id":"postgres-migrations","_rev":"20-8894dd0255801843191c697ab2ec1dd8","name":"postgres-migrations","description":"Stack Overflow style database migrations for PostgreSQL","dist-tags":{"latest":"5.3.0","beta":"4.0.0-beta.1"},"versions":{"1.0.0":{"name":"postgres-migrations","version":"1.0.0","description":"Stack Overflow style database migrations for PostgreSQL","main":"src/index.js","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"engines":{"node":"^6.0.0"},"scripts":{"lint":"eslint src","test-integration":"ava","test-unit":"ava src/**/__unit__/**/*.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","prepush":"npm test"},"dependencies":{"bluebird":"^3.4.6","dedent-js":"^1.0.1","pg":"^7.1.2","pgtools":"^0.3","sql-template-strings":"^2.2.2"},"devDependencies":{"@mft/eslint-config-momentumft":"^2.1.0","ava":"^0.17.0","eslint":"^3.9.1","husky":"^0.11.9","sinon":"^1.17.0","sinon-bluebird":"^3.1.0"},"gitHead":"a3ecfe14307dab72ae6b9bb29e847a085628c546","_id":"postgres-migrations@1.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"dist":{"integrity":"sha512-fCC8trKycNi6Btcza2+wv/IRko/cxZmungQTyAT94lN4SRg6Ish30OVkghDroyjUwcpOl0en4RtC5nF6OMCe+Q==","shasum":"b744007089f92513323ff9a262586e186c807997","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8uMIHBCWTU64yPUJhMj//H9dfwPZZrobfiNeHqk5snwIhAP4vOaJjjOpiSshBvwkvT7RztrPD3wiBvhTqOv9wiCi6"}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations-1.0.0.tgz_1507559281195_0.9007672306615859"},"directories":{}},"2.0.0":{"name":"postgres-migrations","version":"2.0.0","description":"Stack Overflow style database migrations for PostgreSQL","main":"src/index.js","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"engines":{"node":">8.9.3"},"scripts":{"lint":"eslint src","test-integration":"ava","test-unit":"ava src/**/__unit__/**/*.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","prepush":"npm test"},"dependencies":{"dedent-js":"^1.0.1","pg":"^7.1.2","pgtools":"^0.3","sql-template-strings":"^2.2.2"},"devDependencies":{"@mft/eslint-config-momentumft":"^2.1.0","ava":"^0.17.0","eslint":"^3.9.1","husky":"^0.11.9","sinon":"^1.17.0","sinon-as-promised":"^4.0.3"},"gitHead":"1ececfa2bb188b09f1ff44c14aed2fa11d83dd44","_id":"postgres-migrations@2.0.0","_npmVersion":"5.7.1","_nodeVersion":"8.9.4","_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"dist":{"integrity":"sha512-L6S0FHRwN0XtoLicic06dhZo4h+uHUGfEFGiyZ/G/6KGUH5Zd034cqwrtIicWERTXkXT3guCORHi3XCTY0LEhw==","shasum":"9c4ba95851d7472b752809e7136ba64d6e082886","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-2.0.0.tgz","fileCount":45,"unpackedSize":44994,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCtoTR5i/cEd85EctNvjqBi2Src86+ZGKN53WguYcPiAIhAPlaNQX30m4h3lPRCShoURtzP/2d1L3VSLuEnioq9qTt"}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_2.0.0_1521133920179_0.7073068925971644"},"_hasShrinkwrap":false},"2.0.1":{"name":"postgres-migrations","version":"2.0.1","description":"Stack Overflow style database migrations for PostgreSQL","main":"src/index.js","types":"src/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"engines":{"node":">8.9.3"},"scripts":{"lint":"eslint src","test-integration":"ava","test-unit":"ava src/**/__unit__/**/*.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","prepush":"npm test"},"dependencies":{"dedent-js":"^1.0.1","pg":"^7.1.2","pgtools":"^0.3","sql-template-strings":"^2.2.2"},"devDependencies":{"@mft/eslint-config-momentumft":"^2.1.0","ava":"^0.17.0","eslint":"^3.9.1","husky":"^0.11.9","sinon":"^1.17.0","sinon-as-promised":"^4.0.3"},"gitHead":"2e896796084d0b22076edffd92408ed4a6cc9048","_id":"postgres-migrations@2.0.1","_npmVersion":"5.8.0","_nodeVersion":"8.9.4","_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"dist":{"integrity":"sha512-NaHBD9gMb4N68RgKvUZh+ZKAO3/ynjWhUXjiHqAVoFpHOaOG+eBkCbFmTJYp1rxh6fXfTUAJ99GP5p1wEhV/cg==","shasum":"f1b5c443e50ac2d0793d84ac2bea3739ce742cb4","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-2.0.1.tgz","fileCount":45,"unpackedSize":45023,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgVTucMVXD0hW2jCWcGCg1x4/t+I9uCUl0/LT1u1SRmQIhAPgLm4yM7QbyRiqV1ii1m6uFBMYzt0V/BIw2+jOovUWr"}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_2.0.1_1522773383583_0.9060546481275573"},"_hasShrinkwrap":false},"2.0.2":{"name":"postgres-migrations","version":"2.0.2","description":"Stack Overflow style database migrations for PostgreSQL","main":"src/index.js","types":"src/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"engines":{"node":">8.9.3"},"scripts":{"check-formatting":"prettier '**/*.js' --list-different","fix-formatting":"prettier '**/*.js' --write","lint":"eslint src && npm run check-formatting","test-integration":"ava","test-unit":"ava src/**/__unit__/**/*.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","prepush":"npm test"},"dependencies":{"dedent-js":"^1.0.1","pg":"^7.1.2","pgtools":"^0.3","prettier":"^1.12.1","sql-template-strings":"^2.2.2"},"devDependencies":{"@mft/eslint-config-momentumft":"^2.1.0","ava":"^0.25.0","eslint":"^3.9.1","husky":"^0.11.9","sinon":"^1.17.0","sinon-as-promised":"^4.0.3"},"gitHead":"99b6be62e9da043831c62ef86007fdf6d3d66d23","_id":"postgres-migrations@2.0.2","_npmVersion":"6.0.0","_nodeVersion":"8.9.4","_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"dist":{"integrity":"sha512-MCAm2zerBYkq4zpc9nRwbFCU2sBNZqtSFb18DmB0ewOEpD0AGr9Q2HL/qb2H6SbDyyo6Cf4VD2AYCx3S/kiLsQ==","shasum":"42ab4b0a8f395362036df0531902cb0c6a09506e","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-2.0.2.tgz","fileCount":46,"unpackedSize":46585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+qYKCRA9TVsSAnZWagAA+M8P/2pW/VuOf7qxOM+Kq752\nZgK+23pdS0JC+1EznpeXVXKS8L8sgwyDRangHkk+IBdyslqyZ3fHgJme0Gy4\nHo6/WEyGisVEKU+b++zMrwgJDYuAqxS/LC3HVMLN8X4DuJBkplzNy4icepQU\n0nQS5GMe94EOzVlWrJCIv6K5U7lyCc6JTvbj6VMHeqo4KftGbcTImnhZiJJD\nGPu7q4YCuAjBaLF6WR5fssu7NL8G12gCEZWlHKlrAfCRO4/MKNUbd3pO6jjJ\nDmgCRJBdx9HxMYAqc92k135FiYO5jf9qSHqygG7CW8t+mxyW0jhtvoESLNaw\nG2grFov3Gw0k66wCNCoFYRSuMa2gVSSoxPPD6040BhsZZ7xvt7gkcfL7kLkv\ng/LVaIX4DJMCpJ/9Cm3J9LPEiiBtUNowll/236xNZ6xr+GztKTChLBvTJ0Oj\n3VJLF5NON9nXuhx0MoZwBSnNg8UKSngOXCSeDwsNKVapK81HHKhquswuGsox\nYCXXncHESf2/2rfIdIt3P2f3g14wbBKMxCjsPvwBZ5IqJsHraZfkOjhKywQW\n312gPQIV5hXxePWKqJxRltQYKSUXBJrduktZhgtNKhLAkTAgMqRNBzuV/Rp7\n5sUs43r73+BoNK9/6G/c5AqUUErct9SgiOa9VyXnJkwQyBwjVzXKSUA0uvGJ\nC365\r\n=4nkh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0dc9ahYL1hDyGC3Ml3+KGFC7N3uUNwDs3aMjPb5OEHgIgYq/2nZdc3WUZXktwbtn9gPoUzEdR5vQFoYAtn5EgrwE="}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_2.0.2_1526375945429_0.04152608082291076"},"_hasShrinkwrap":false},"2.0.3":{"name":"postgres-migrations","version":"2.0.3","description":"Stack Overflow style database migrations for PostgreSQL","main":"src/index.js","types":"src/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"engines":{"node":">8.9.3"},"scripts":{"check-formatting":"prettier '**/*.js' --list-different","fix-formatting":"prettier '**/*.js' --write","lint":"eslint src && npm run check-formatting","test-integration":"ava","test-unit":"ava src/**/__unit__/**/*.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","prepush":"npm test"},"dependencies":{"dedent-js":"^1.0.1","pg":"^7.1.2","pgtools":"^0.3","prettier":"^1.12.1","sql-template-strings":"^2.2.2"},"devDependencies":{"@mft/eslint-config-momentumft":"^2.1.0","ava":"^0.25.0","eslint":"^3.9.1","husky":"^0.11.9","sinon":"^1.17.0","sinon-as-promised":"^4.0.3"},"gitHead":"2d24365b2076299015b59ef69ead7e895c86f607","_id":"postgres-migrations@2.0.3","_npmVersion":"6.0.0","_nodeVersion":"8.9.4","_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"dist":{"integrity":"sha512-xsAXWbLOtDWD2LB2tMlMd78lVT3sNepUez9qTmcdzd0o5niGQ2UOoED2VmH0EpR0Y2nHwuEnK7eOqM+a6DbeHw==","shasum":"ef987b65b1f5eac71e0ffd519a8f88d5d9298e17","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-2.0.3.tgz","fileCount":17,"unpackedSize":22584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+qsMCRA9TVsSAnZWagAAdXIP/02RMyHgI9+qHOCeYieW\nU4WSO4v/gXhcI8CnjCqS2wq0+M5zJEo/THT3i8ga/x3pYmc0rEDAdRswSr5C\njJl+6YStMeifeuXOVUM1/DxCq+t2lzcjfNoWy9rhPED4ce5cFIue3IBg64Uv\nXOcKuhwiy9eTaf2wbnejUmozJUyW44nB76TKdGdLDn09/2ummSpkHPJYfV2w\naQoFdUYguZOIoA+jS4j5TbRUw+RetnghdIui51BNRZ1qj1TR8g16RmE2vJKh\n5oMSTxlUJ3IvTWYreEcjxBKfUs+/RlmKisyAyM8YL4+VoEg4jz24098eMWfZ\npBrwPAmCcFFDMLRKgJyHL4Owz0Fg3Tnz0SuF9LZrBXd2CClb76j9v2tjHMfh\naXuGDt0cUJcrT8VITxQcroxloF2qrkIO9YJ66PohPb1TAU1NFBEt+d/tWayj\nWoTz1R/VYymQ8ayX77j9AshpLRr5x7KfZaHEm2mU0/mI/1wmenb4d2pofMWu\n710SdwTotu5qs4vbaTXolMJpwgAAza6ixvo2nzyZRkZ18R1WQnf/eUINt4jT\nKDmN6gpTBFC/J74n7xy/cnaIkbcEF5ns7iNNKq/fGofXVr9RpW9Ue95ziUmv\nBB3bxgF6V/nbHYCdHWXPK9E8I2PaxWi5wFeNl9q2AqUV3XMQsb+NSwnz/KYM\nXtKf\r\n=T430\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYl2tTVuNlOBRmOs+E3lY1SFq1qUNvubkUlV+vv1316gIhAL9Ypnic6JHI433YLc1zI4GiwxNn4uk64MHk4R3t/XqB"}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_2.0.3_1526377227412_0.5384317584842313"},"_hasShrinkwrap":false},"3.0.0":{"name":"postgres-migrations","version":"3.0.0","description":"Stack Overflow style database migrations for PostgreSQL","main":"src/index.js","types":"src/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"engines":{"node":">8.9.3"},"scripts":{"check-formatting":"prettier '**/*.js' --list-different","fix-formatting":"prettier '**/*.js' --write","lint":"eslint src && npm run check-formatting","test-integration":"ava","test-unit":"ava src/**/__unit__/**/*.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test"},"dependencies":{"dedent-js":"^1.0.1","pg":"^7.6.1","pgtools":"^0.3","prettier":"^1.15.2","sql-template-strings":"^2.2.2"},"devDependencies":{"@mft/eslint-config-momentumft":"^4.0.0","ava":"^0.25.0","eslint":"^5.9.0","husky":"^1.1.4","sinon":"^7.1.1"},"husky":{"hooks":{"pre-push":"npm test"}},"gitHead":"79721d22db07d8f83f71858013bcfa3b27e847f3","_id":"postgres-migrations@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.8.0","_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"dist":{"integrity":"sha512-7JcKLXZmwfldYfTpaUV7uuQriB1qedHvXtPLraXsuSZko1CWlS8cpMyCV+hCQgh58Gb6gy4xbdpEO6e6AVtGwA==","shasum":"7235dbdddb6a61761d6ff1332db58fae83a1cf60","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-3.0.0.tgz","fileCount":17,"unpackedSize":22622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLOFbCRA9TVsSAnZWagAAmgsP/i4uWFY4sIqxSwsyiJzW\n1nJDcPI/NIRF2U6J1/BeJUx8e/g1v+YNNbgPqNNoWaAGwYxYvYJHRmeph/9J\nvpiKpACl8bTEGHZt/cqDu8mwRQ3ZVuPlWyiQWoLPlmqgMpWKAsMzFs4Mgy0k\niTy5pD6mqNUI5+Xv++/+GNqJIogZNGS5+MmBYczKToRZBoQthTOiBJJFfyOQ\nuXMyLK+dBKkVj69vmW8qWjNroif5Hen39oDMW4ov3vHc5/ZUNFOQIX1n0Lol\nFhU1PHrYIxXBaSs3pHFBP73b0wDwq3dFlQIm6oQoyQ8Vwpim/+QQ7QpUfWu7\nN/CYIXekVnd8m1vYardFybWRlvaKiYb5S0UzOuZmvP+dkkEhm8yz6tkuGZxc\nTIPEq8ZsXfccR1+6roy05FjaVQ/dt1me7VG4d5drzAcWd4mq/mQjutXPfGYy\nkSendV0slEa02W2/APkjXgXIapuZ53boD9Ya9liu7s1TzBgsULzKAdlqX6c2\n1Y8wYExZ25ZW0KThGlND8D6+dYfi2UOBu1BLrMOJrpRrUWY4UUFlh7dPxVZT\nYFgI1axZ5tqMSChNdg5QZiqNyhjS7sNdlCdL67jx8S2PBrdIEiE9uwjZ1aGc\nxWoI8Mjwyzwkvb5xQn6ihlMXUzLwYlXu333wvr+gusA5VuiCUKZsfYF7XMxO\nTxPW\r\n=B6yV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6rzbe2IccfYRWA1DDC+MnPwKoWn/HTyaghoLuC86lPAIgHs5GGxfw8IDonsIB3ZIbNeFnFe0Fwu/auOAzzfquI2w="}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_3.0.0_1546445147024_0.6405642892293772"},"_hasShrinkwrap":false},"3.0.1":{"name":"postgres-migrations","version":"3.0.1","description":"Stack Overflow style database migrations for PostgreSQL","main":"src/index.js","types":"src/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"engines":{"node":">8.9.3"},"scripts":{"check-formatting":"prettier '**/*.js' --list-different","fix-formatting":"prettier '**/*.js' --write","lint":"eslint src && npm run check-formatting","test-integration":"ava","test-unit":"ava src/**/__unit__/**/*.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test"},"dependencies":{"dedent-js":"^1.0.1","pg":"^7.6.1","pgtools":"^0.3","prettier":"^1.15.2","sql-template-strings":"^2.2.2"},"devDependencies":{"@mft/eslint-config-momentumft":"^4.0.0","ava":"^0.25.0","eslint":"^5.9.0","husky":"^1.1.4","sinon":"^7.1.1"},"husky":{"hooks":{"pre-push":"npm test"}},"gitHead":"a3512e6e73e43e937de5c30f520c857175351546","_id":"postgres-migrations@3.0.1","_nodeVersion":"10.8.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-38vJpDrM9C2+oMP/2CfBIl2dno/ZChyIHCHaJq4AXVIm1fa3yR7PB+V37BznwQ8Xz2IOi/U073egEMG9viJJjQ==","shasum":"8bd0a973f3c6817bc5e52808c35a8f810daf431d","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-3.0.1.tgz","fileCount":17,"unpackedSize":22622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXYvZCRA9TVsSAnZWagAAikAP/j6xuXgID+ZfNSCklYmU\n1pd9wMOGy0Jch1LYlKhwpSs/IoUcCZQ9q7ymGhBY13qRLqGrj91iRyltfmd0\nMTpqOny3OqGWc3EmLpsAX2nzq8rGyK6k+WHB/7VsxnwwYHT8f7Yia6yBSt+5\nRHbTL73EwXQt4qfID5zJzNc3fjjMBpQTXkU9OmhBn3jkMC6FbYwtnnpyzx1Q\nPaXrukTMfD3fAY9TC9YgMU8KicvchhSMAqWmcIO7KKRMmGIO+UNegophEZ4w\nKuWV5ByiQhnKr5dd29gG+aiJDE8Ikp9QsKDmk8+SksM+6hLq+yLiRiNnh1A3\nUXwDYlPRitwkEw46mpp8Wk7+HnbWWXP7EO0SDmEXkGRs7l99CjGJThXLzN42\n8SduWsD49ian4iu6bgjxPIUBFBwZaU9GI0ThdWc+fVPLxLwjodvKH2i6PQqv\n1rn2yftwNYXFiFpypAGPwyGKEbSD8BHtrLNkhaTiKgrW8eMxrGsjrGq0/WIu\n/FSYwKD+20E299oTuYk6Wf+OOP0qlhP4KXnvN8HZriJX9082uM5vIZZTrErG\nAA6IQWyy4R4At3pU1fblwhrGCBgOdzWJ7YW2DPK8P5+XOicK5zmC2vi525V+\nL5EY+rxatjLVYbwC7wQ5hOdmyEDHWwYJEnVDhBQii6i4h0rGtgWjHRt2Ibo7\npH6t\r\n=Etk4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIYU01H/CSb2+zinlo70+W+RCnnQvZEPddViiyaXiBuQIhAInxLLdw2z58jGCLwq8IFIia28ZcE9EoofmzMO6nxm3t"}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_3.0.1_1549634519952_0.3546935921087877"},"_hasShrinkwrap":false},"3.0.2":{"name":"postgres-migrations","version":"3.0.2","description":"Stack Overflow style database migrations for PostgreSQL","main":"src/index.js","types":"src/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"engines":{"node":">8.9.3"},"scripts":{"check-formatting":"prettier '**/*.js' --list-different","fix-formatting":"prettier '**/*.js' --write","lint":"eslint src && npm run check-formatting","test-integration":"ava","test-unit":"ava src/**/__unit__/**/*.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test"},"dependencies":{"dedent-js":"^1.0.1","pg":"^7.6.1","pgtools":"^0.3","sql-template-strings":"^2.2.2"},"devDependencies":{"@mft/eslint-config-momentumft":"^4.0.0","ava":"^0.25.0","eslint":"^5.9.0","husky":"^1.1.4","prettier":"^1.16.4","sinon":"^7.1.1"},"husky":{"hooks":{"pre-push":"npm test"}},"gitHead":"fd33ba09948034be076fddf92876071353e29baf","_id":"postgres-migrations@3.0.2","_nodeVersion":"10.8.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-M7JY+dq+/Yl0BySHVQdctjCSuE0saG76ruASRmD0GIYt1+OSEkcTGN3RrVIpqJIPWcMdv45NQ1dNWhd0/pt7Hw==","shasum":"532ee554a1190c3900390edf3d6643caacced291","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-3.0.2.tgz","fileCount":17,"unpackedSize":22622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcm2NFCRA9TVsSAnZWagAAetkQAIUe86ZD+KeuPbKqjiCq\nOaSq8EikenliGorgBsN5xg03S3DwxSOjrPy7K4Dpv15uMnKrrBn6hUCSbT1r\na3hBnaa4cgAayN6sfB6El08Od9PiyQkv//nhehmVZHrhsDbMylCBC4gqIbm+\nUXw3xd1aM/4OwJQBXZuCX8nqmbCPNrukKeeqqWB3KiQx+enicifJREbJjfui\noAFxdqAidNaDzrngAd4r1b7kpul6YOYkeoOAtVRxMR37Xus+zn6sIVbThn3o\n3kvQeCoHecxSoUyO0Q3wdWuQUW6a9pItLRDCD8jrq7K4qX6hmVVEkvtZyuqU\nNL0NGzRDq833FvSZNgG5iTq4H//okE+8UqIoyB/Q0gZhnPs3PlgBpf9BlVC4\nLsscM41ZrI2vHNyFkYE+IaSx1611yb6uDiiDZHIrxpMLba87C8A9Yt0am7M6\nvyxfRy9lkoYBQbDdgD5DjosXm1cRZOBjrE09oZjJK9X9LRh8niOjGsfBOksJ\neB10lh1kq//MlUFarDNXp/atjfsRFPsY408Nl5hyxMVQbv3FWTmmG+3ay9BG\nR69PJj2xZkhHOHJsnmrMcS3aeZhDn0D3BOKf8PDnFZUBN+VZuv3BwktB3POc\nr0rDsh+J7ruf+b8m3oY+aZpH4zFxFi0H6RhtBUKMqbTreASp0ALnCWaAN7sp\ncOij\r\n=mFKh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH7B6KXPAFU2ILYtA3QO1GuFF7w8PslwK0qK2pgdDfHdAiEAiJOUnF9Cl3lIxXdIyHHHy/ZeBoL67P5UBXgY2pvGBLY="}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_3.0.2_1553687364765_0.8723679288909554"},"_hasShrinkwrap":false},"4.0.0-beta.0":{"name":"postgres-migrations","version":"4.0.0-beta.0","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"engines":{"node":">10.17.0"},"scripts":{"check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.js","test-unit":"ava --config ava.config.unit.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --prune-empty-dirs src/ dist/ && 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":"^7.14.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/bluebird":"^3.5.29","@types/node":"^10.17.8","@types/pg":"^7.11.2","@types/sinon":"^7.5.1","ava":"^2.4.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^1.19.1","sinon":"^7.5.0","ts-node":"^8.5.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","typescript":"^3.7.3","typescript-tslint-plugin":"^0.5.5"},"readme":"# Postgres migrations\n\n[![Travis](https://img.shields.io/travis/ThomWright/postgres-migrations.svg)](https://travis-ci.org/ThomWright/postgres-migrations)\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\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 {createDb, migrate} from \"postgres-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  await createDb(databaseName, {\n    ...dbConfig,\n    defaultDatabase: \"postgres\", // defaults to \"postgres\"\n  })\n  await migrate(dbConfig, \"path/to/migration/files\")\n}\n```\n\nOr, pass a `pg` client:\n\n```typescript\nimport {createDb, migrate} from \"postgres-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  {\n    const client = new pg.Client({\n      ...dbConfig,\n      database: \"postgres\",\n    })\n    await client.connect()\n    try {\n      await createDb(databaseName, {client})\n    } finally {\n      await client.end()\n    }\n  }\n\n  {\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\")\n    } finally {\n      await client.end()\n    }\n  }\n}\n```\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 run in a transaction\n\nEnsures 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 ... aquired 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 ... aquired 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 **not case sensitive**                                                                                 |\n\nExample:\n\n```text\nmigrations\n├ 1_create-initial-tables.sql\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├ 00002-alter-initial-tables.sql\n└ 00003_alter-initial-tables-again.js\n```\n\nMigrations will be performed in the order of the ids.\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.\n","readmeFilename":"README.md","gitHead":"8f718cf9840cc3868ab24503e8a98190887cd82c","_id":"postgres-migrations@4.0.0-beta.0","_nodeVersion":"12.10.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-paGQ98mXsVmoOdJcVZtFhSaVkGIZqc5cPMFReRuSnx2+YSbCqPr/AykZLa7hx9ZuFb4FromQPg5tkNsJfDz8RA==","shasum":"272628ef0134c356276072a8cac099e0146ecf7a","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-4.0.0-beta.0.tgz","fileCount":63,"unpackedSize":57109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+KsnCRA9TVsSAnZWagAAjnAP/isxrcWhpTVhLAUVArQ2\n4N3Plw968gqolkVHiTAjV0OHLFBqn4zVl893JkJYJti93HX9Q83VBZLPrf8p\nI4eKrVXe7yquWQAbs2ET6nScN/yyYX8WUJgguzyAlo7c7nLTradutD9KB3Jb\nkjdlHB/eoswDDoTK8O9PhMU4varhSlzYbCnttoa/apLi8u0w7QzjeEhxqp48\nmSjP+MsFdATkfC1mlGrih9Kty43mRx61ZrHMeQbD+Ub3Hx7vIl3AfL6q06CZ\nK+SdvXKpOBITaDCR8uZ5TcLbvEdLJDTHNX1YyRDJYNf630fAcMl4jbAlXW8I\nVVl3P2z1MwMNR31gkVr48CcBpvczMBBn7S3BAmKzEN5ZRv6tvMmTecYg2p/t\nHkIWDhgA9Fft2I5RAWsnLX+d0K2OeTqvoOTAnWT5oXcDnPfmt8qQjmB6pvMA\nzIsGg/4/eztfBFACMxwgf8rhzIpoDR7ZbpAaDsLWmRJPmIyUnyvyhG4wjcTR\nrU//3wZWGC63EZKJ5KM4boBcT+5oq4miFYu6t3y0qeDIrmDlzdpO12iXaQSc\nM36OsNn8aJDHuMzbuT6zxVg4wgQc9H6LBgwg7qfM2SMvu9uoVMwA5HLicar1\nACn7Kj+Mu0ePKkWjMOGsTQUF/RfIY+WGkWI6bgi2xY/cTWQB/Bioz/fDIzGT\n0gjN\r\n=jYMd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIECBqlLhgyab3zWaxP3D1BcaGisUVHBhxW6B85TeJYJvAiBnjeDwN5QYI/ayMCnLPOWo7XCBLS5xv9rMsP8aX33+pA=="}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_4.0.0-beta.0_1576577830879_0.4781252524487434"},"_hasShrinkwrap":false},"4.0.0-beta.1":{"name":"postgres-migrations","version":"4.0.0-beta.1","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.js","test-unit":"ava --config ava.config.unit.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --prune-empty-dirs src/ dist/ && 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":"^7.14.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/bluebird":"^3.5.29","@types/node":"^10.17.8","@types/pg":"^7.11.2","@types/sinon":"^7.5.1","ava":"^2.4.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^1.19.1","sinon":"^7.5.0","ts-node":"^8.5.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","typescript":"^3.7.3","typescript-tslint-plugin":"^0.5.5"},"readme":"# Postgres migrations\n\n[![Travis](https://img.shields.io/travis/ThomWright/postgres-migrations.svg)](https://travis-ci.org/ThomWright/postgres-migrations)\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\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 {createDb, migrate} from \"postgres-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  await createDb(databaseName, {\n    ...dbConfig,\n    defaultDatabase: \"postgres\", // defaults to \"postgres\"\n  })\n  await migrate(dbConfig, \"path/to/migration/files\")\n}\n```\n\nOr, pass a `pg` client:\n\n```typescript\nimport {createDb, migrate} from \"postgres-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  {\n    const client = new pg.Client({\n      ...dbConfig,\n      database: \"postgres\",\n    })\n    await client.connect()\n    try {\n      await createDb(databaseName, {client})\n    } finally {\n      await client.end()\n    }\n  }\n\n  {\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\")\n    } finally {\n      await client.end()\n    }\n  }\n}\n```\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 run in a transaction\n\nEnsures 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 ... aquired 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 ... aquired 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 **not case sensitive**                                                                                 |\n\nExample:\n\n```text\nmigrations\n├ 1_create-initial-tables.sql\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├ 00002-alter-initial-tables.sql\n└ 00003_alter-initial-tables-again.js\n```\n\nMigrations will be performed in the order of the ids.\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.\n","readmeFilename":"README.md","gitHead":"be37ccf124c308d6d1215c5d0695a22e9b907e13","_id":"postgres-migrations@4.0.0-beta.1","_nodeVersion":"12.10.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-F/W/nHd87Z21nZg2PNI7GuMuFWrh+IBS3KfsLq8DDmJjDtCd2mQdn2H4bhzNMuQi80I7aLPWRDTegzvW+3b+zQ==","shasum":"189c9daab5fca1fbd6054e10a2d617bffe96c1f0","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-4.0.0-beta.1.tgz","fileCount":67,"unpackedSize":59482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+K/SCRA9TVsSAnZWagAAEAEP/2kbh5b/ynHcZHhpE817\n0iCxpGv13ZqUW5w6Tzl9cG87Qhw285LjUKPcks12PvnfMyUANzEewj181/fv\nIWkruRGEkx5OwuUUYtz1majuSubDrDfja2UrzfztA235Bi562zP1g1ewFUYG\nypI3HEvADN+kSDjL0Y8yp8/ts1dfmnzqtV48kK958xHBHhh8dmweTEiT1NxT\nJ0LaoY/G/b/ecBZssRo8u+oHAwkVpwI+5uO0b89tzeHXZhxl/wtS2FjiPv8q\ndCYuecEy1f/hz/08I0V7ae1HgSQH8kE6e1eUR8NVr2vSGrUlLtlLas+Kw7c9\nAZEIrYmT94ccqI55/YLd/aeTspBFYIyubQgWtFd0UOTEYLFdoOz0LrOOdRtv\na9H3fpyCAsw6vViu7x7T3EYZXHGgIwru2q0XXjcW5dANXPI7J59An1mENERs\niekMLEfcmGySxhJd9ukijLZIppscFYcy2E4jvSeljrCghOUqOnVlJtY2YAum\nH6WaFFCfiFQma5rQcaExzLDZZVN18vAvIRJWA9yKdIIhIgyKbMxpb6O83e2N\n1ETMlBKCnDBjbtu+FBd4uWagAxUQo2RsrqKhNPg4IT0BxmK/u2pE3Fk/8yeE\nfZzt1EnoXrgUe8aXV7qQKepxBSozTZl8OTPX0XKMTSNnW35kuOcDTpamshek\n9KHe\r\n=Gg3A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+o8jOFAN2s7goj+6YzNVehsuMmaJEFr/9qf8OrYHWMQIgPDLvTbFYg/jBcRy++jj9aWusxeiAGTyMnJ2zKu++Fac="}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_4.0.0-beta.1_1576579025766_0.3069942050437098"},"_hasShrinkwrap":false},"4.0.0":{"name":"postgres-migrations","version":"4.0.0","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.js","test-unit":"ava --config ava.config.unit.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --prune-empty-dirs src/ dist/ && 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":"^7.14.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/bluebird":"^3.5.29","@types/node":"^10.17.8","@types/pg":"^7.11.2","@types/sinon":"^7.5.1","ava":"^2.4.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^1.19.1","sinon":"^7.5.0","ts-node":"^8.5.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","typescript":"^3.7.3","typescript-tslint-plugin":"^0.5.5"},"gitHead":"c52f70ff818377567cc50f9921215d54872a5836","_id":"postgres-migrations@4.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-DLSttz1rXMEEbbo+Slbua49ktiJRdwXgMe44jdsFxochAgTNIgEtId5IFneyj1XnF6rBQtQvxreOJM6T07xtdg==","shasum":"18e5b6b06a9300fb19a32377f911408a846797ff","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-4.0.0.tgz","fileCount":67,"unpackedSize":59475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDw76CRA9TVsSAnZWagAAV0oQAIKvQRsoht0Q3yKOfzKg\n70+31ui7tCsv9OKraQTjKIaQoqJ6YASdn/yYsvTJ+JnmN8Pgb7v/P6vh2sL2\naUm3NtHLdF6Qr3a0ypcGne9a7g8tUyW1/uiwC879VTbg1rcGmrJYEz07cVvW\nLi1K+JdI1Cz5hqZ1qZWPSCM11SQZpyHoMwkB+SfQ1NG3gkAgHsI0RSXQFY20\ncLUIB7TdSLQc07juP5xvB7/NPFVnsS92q6VZu6W5hnitrc8mczvyLWH5LNTC\nlKOgfeZyC0WZHkwL6DLKWQwVK5QQfLyOMvFoel5b/jUpUJ94ZQSsxSqicwu9\nAn3KGptYAZlPZ86ROk6VfDxZbKW4EpkKCy3fnrSWyuvuQFKzLSHam9KGZ7gC\nTchbom534FQpJSnxnEueFnAnNkl6anN9HHvOoCvswVKMswD7E8K71XFC6YcV\nQl4gH0AnS2esrAyn1CMXWUNJQTUWua1v7JP+0mlBXrNDJZPi31gsb59bqfpT\ntzQIyZi1LU+rkS+rPO2ENH1xjqCzE9I5ngpMz47OXSGq+/d6fX0EI9olqET8\ngmbiSWKS8kNOi8HEMu7DRMgirDlSWjcywxO15JTbd8KdAsMzReXifguPNyvn\nfONcCrVNeoHwrQCulFV9ylyiMMhi0+w4GzG2nW2Ze3ufhsFp8aCHR/6fe4gM\ncHwN\r\n=7zzS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsN5qt6rZNhsu81RU2oZbzIXYx4iH7d5Wmz7q5/qJuLwIgUyNSdT6mjbpBZUM5Jf+gKRki/MpqTbwtFOZoKkFreJw="}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_4.0.0_1578045176844_0.03658889503527463"},"_hasShrinkwrap":false},"4.0.1":{"name":"postgres-migrations","version":"4.0.1","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.js","test-unit":"ava --config ava.config.unit.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --prune-empty-dirs src/ dist/ && 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":"^7.14.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/bluebird":"^3.5.29","@types/node":"^10.17.8","@types/pg":"^7.11.2","@types/sinon":"^7.5.1","ava":"^2.4.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^1.19.1","sinon":"^7.5.0","ts-node":"^8.5.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","typescript":"^3.7.3","typescript-tslint-plugin":"^0.5.5"},"gitHead":"3c14ddbd5ba67c18738b71fb5cab9daaddc5ded2","_id":"postgres-migrations@4.0.1","_nodeVersion":"12.10.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-xiXONrj1i8LULDudCHznkDLgA2e0ON797Xd7d/pMyP8frFEre57jVD3jPitBdXGY6m2sj3Mp26kspvxaQo4ZMg==","shasum":"f136c03672d37dd1ab355adb0a6e282c11f0a1e0","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-4.0.1.tgz","fileCount":65,"unpackedSize":60665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNEFzCRA9TVsSAnZWagAA1/wP/0WdreuenyAQk97++Mrj\n4D3ss4Kh6bCH3BSX4ddRwdztCBIc8pi4wo8jCZlUdLg1M/iWDohuA3HTKgY+\nXlaN0rXQrfTcGZ/It/HngVqEl3Z1x7MsEWvmsiGCmdfqr4Wf2yOW1uhIKPif\nICRI0KK0+0XojHBWHZm13OFGLSDgXcI+FiX7YPsXUIHflJCJxm9UL+MK4y3R\ndDEOLe2K0qkzi1PIUCefCm8Ll3ybmbPSFR6wqiVdD545PqujwSGDuAsoNjzj\nx7vmFiPwjPZRqmzqBzg/wEQe61MpUvk08NIyEs2nFBour4b9OKorRAezyxb1\nxCGaJPi0JeBziqzayDVOghIkHZX9wC6Lvx5NwnTLBQuYly2AQ9ME+kgLFoc7\n6BiuiEgT2UqtUDJSg0GhebfY1CF6ui5t8JecvcgvF6tMdBibqhCiHBsqWb+L\nt1HNmr4Vl6TD2kYytDdJn7Z041I71Xn32MA+QGJ8WhhfLKCR8HrNyVmGfomy\nOyqgIJFE2gzZQwgEb2l2PufXVNasnvIvtfM+uUXktqfsmgOp3pXMUVi9D/eM\npka7yOhn3OLO+qJ9OpISHU9EaPfvKg9oAxckbzi5xAeBq9Y8OR5GqYD8ivqE\nDyPT29Qz1qF4EJxEJnn/NgWzCt+CNxSsQTh4oxlksSVCwrhFtpfN68N4hWpM\n/JQB\r\n=DWKk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAZETed5tYqSyYwcBTtPUkRGH2znJ/QOIyrAviPo12B3AiEA4fvy2scUU6o7quFU64tef++LG7Mdn52rz9nRvj7OESw="}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_4.0.1_1580482931184_0.2906183476550863"},"_hasShrinkwrap":false},"4.0.2":{"name":"postgres-migrations","version":"4.0.2","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","tslint":"tslint 'src/**/*.ts' --type-check --project tsconfig.json --format verbose","test-integration":"ava --config ava.config.integration.js","test-unit":"ava --config ava.config.unit.js","test":"npm run test-unit && npm run lint && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --prune-empty-dirs src/ dist/ && 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":"^7.14.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/bluebird":"^3.5.29","@types/node":"^10.17.8","@types/pg":"^7.11.2","@types/sinon":"^7.5.1","ava":"^2.4.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^1.19.1","sinon":"^7.5.0","ts-node":"^8.5.4","tslint":"^5.20.1","tslint-config-prettier":"^1.18.0","typescript":"^3.7.3","typescript-tslint-plugin":"^0.5.5"},"gitHead":"2bea704b17e4cae5e218f66a9310d2dd1ae94ba4","_id":"postgres-migrations@4.0.2","_nodeVersion":"12.10.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-FB5y6ykxJeKKGxnKpoXx5t+CXUKRBOktztKhVgpPU4EgfUpx7cpJ5zG2tpRmSfsK+DpZMf6FuuUo+cZf+d9AZQ==","shasum":"9333c0eb5bee116d1f2a2a0c1e716a5cfb2b62c8","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-4.0.2.tgz","fileCount":47,"unpackedSize":36222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNEopCRA9TVsSAnZWagAATQIP/i7O71jXGYZlTtWThNYd\nZrZGWObENhRvr8qT9wauM+cZl9vYskdnjyeNUSkXUBi2GmwHyU591OVqBfej\nSIHaG8gmdhTMbC8mGzdGDXbH90G9AwgGycrT0+xwyT/Aw5/MzOHQaggULm+l\nWHQhk7PZjb6t+5gVShmXuAQV01AOarxDbGGANBSjzvd/0EHLH1nnPxb7a3zk\nG1y1KpH89XbIXFA6A1aJAR7odJ4IWgEDq+cGw0uaewJc3FHqHKp2/DpgZQqK\nFf8QGRrgICREagnY4MPBIQtRWsUREeCvsKLrOIikbItjgScpgMEB4vqkyDtn\nrM/3/+JXnZMcMBbdMK3+fMVmk1+BO+GJcSbisNds17rzbUwqxmBTQ2t2eazi\neB7AKqz7PxefEyjxUfH06Ncj7S2MOCuEyLS6EURYFGkOvTa7Y603hpXufd7g\nCtG/7E5zEIwV3A5dbVjuoIfumABWWlPxO8svivzY3QUw4BQVsyuE5DSJWbCU\nlNH4LP68asbIx2Qtxe9dmcTek0k59sX0w2TBsgixOcLNN3ubx746ST4FcjXL\npLgykYlvqLTlv7JC02t0aLsoJe72o02qxwuJK/gvz2yBKbx612RPED66d9NV\njLpcAznyt9DruWFCqsNcPSPoe0U/oeQoK7AQeO/NdaS9kmGvxwq8e/WbR3wT\nxvem\r\n=Ft2w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxRgCXYFChb4naX6mejXS5+QztSHQQllWDVPb0AnrXgwIhAOq1fVPRz+b7/F1fk/u0Wy56QCg/9k9BP9bCe+Y4/VMB"}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_4.0.2_1580485160554_0.5117162459153908"},"_hasShrinkwrap":false},"4.0.3":{"name":"postgres-migrations","version":"4.0.3","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","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 && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --exclude='__unit__' --prune-empty-dirs src/ dist/ && 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":"^7.18.2","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/bluebird":"^3.5.30","@types/node":"^10.17.18","@types/pg":"^7.14.3","@types/sinon":"^9.0.0","ava":"^3.6.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.0.4","sinon":"^9.0.1","ts-node":"^8.8.2","tslint":"^6.1.1","tslint-config-prettier":"^1.18.0","typescript":"^3.8.3","typescript-tslint-plugin":"^0.5.5"},"gitHead":"b3348cad829f110ae5d5931cd2473b4193f2c905","_id":"postgres-migrations@4.0.3","_nodeVersion":"12.10.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-k6+ikiS2ZDJS/1fRsbms7N43nUIxlWswHGma0b8HcRkJil/QyEN+gw7yQ2Zu34EpR+TrHNOjV0oqUNMLZupoVw==","shasum":"869972cabd26001edc18067c5fc18dd693fa93c4","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-4.0.3.tgz","fileCount":39,"unpackedSize":35532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJei1ShCRA9TVsSAnZWagAAk4sP/R6CxefOZDDlpGg5FXtW\nZcGXYLDh12r/Qxw9gzXJ3g9M/EEZ5cl99eVoOiQ6n6eQzzsVHEodheFX97+e\n0+2oE+1124NUBUwWlUsNQlakYVgdIvWHXCtLmt9XOUqkbYtj0jzeRm3ivoQH\nsWQcVQvCuFg+XfY3j7CeXZAvs4eDnbDkPJ2aM/+gNNKHMJ4jGw/KwzxrPrUe\n79Y7lRk0SKjhFJn94RsgI1B1hkC8fA/8ffxMDETGfpWrTPYx6BCX2h0Eu5K6\nPi/luTtw6l60M7Xir5ZrE+yaCNXw9sGC5XLUHm28l8PisoDWA4nTX1Jltsri\nPbvXi3rc7/jm2cGDP6/74kiMo97ktGxvSYZfKFonVioXVIL/1Pnc10a+sKML\nPRyRXeBzIIcersFzCkudC5ib3nVMOu3nkntdxor5Jmje8b1Imc8ZGu9xZ2uZ\nuQz6lvDxmSRssnVfA5aN9FCFmKBcFz9rUHDeCwl3e9erpp4fTGNnlK9ag2cP\n+Pat9EnvY0XyjBG5rlAajodNdjhAEswLgJxEbYoF21IA0ac9lF2rldVi/NRY\ny19n2Q5JAkmnYNRP4NdzRN2d9KWT1ezSILdl1RFW2ex8RgXXoCwAg1usXDxl\nuEsLTtEsVlA8cW5kof66m102P+rBon1N+3AYTH5D6P9rr8zCYtQIYBs5SToA\nx/qI\r\n=6bl4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoLn7jmZoWLGJDXfy8313flhlhVyYd+SrI6ZcS67v+kQIhAKo53/8IucpTHi6Q8MPC3oir6izNgl5V9yVt+00GoBqu"}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_4.0.3_1586189473266_0.7322871100403336"},"_hasShrinkwrap":false},"5.0.0":{"name":"postgres-migrations","version":"5.0.0","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","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 && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --exclude='__unit__' --prune-empty-dirs src/ dist/ && 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.3.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/bluebird":"^3.5.32","@types/node":"^10.17.28","@types/pg":"^7.14.4","@types/sinon":"^9.0.4","ava":"^3.11.1","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.0.5","sinon":"^9.0.2","ts-node":"^8.10.2","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^3.9.7","typescript-tslint-plugin":"^0.5.5"},"gitHead":"7b15e3ac23812a669d84c58415739e24fe318917","_id":"postgres-migrations@5.0.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.7","dist":{"integrity":"sha512-6K04AJM6iLVM+hzk+VC6kTWipg0c5B7iUDAqQrEXqiepS8p8zZQKyIC4lLumRJBBwBg7H/ESuCfHtdWpbL9kZQ==","shasum":"884f31b2518b467c12109e90dad1f7769c811709","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-5.0.0.tgz","fileCount":39,"unpackedSize":36265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMSjbCRA9TVsSAnZWagAAdF0P/iyNFFMK8bl076r8pok+\nwQtlADq0hbqlH+cKN75wrw4fcNDQwSczlTsq1phHsnOcvr+pLiiWIHT87PMR\nsjWxuZgkGKsGjebGd2xwNZeKg55qyodbf8M+7tNGDMFuCcXAHd9qbYotXOnv\nW/BUY6BWbxsKrc/EUuuDXFitAj2FWPiyQ8U87lcJyDL807p7DbtVGXhKHoiF\nkwX4/ikcbuar8QUDHNn6k7zQtx0CwBhv3kQKtZtXs1dPEbEHjrRw9powkqJj\nCOVV01pVmrhX4OrA1SXi/K39WDHnkz931w5dwD188k9SnAd91OXs0dU6msOR\nNHPLopW0EuX6MvNk6YJ3kQerlB5NouMhSjap4qgt9bHtYOGpHpfRVP4FN931\niP1ElcLv18ymDkUVbmh9BAjrHz1VzdV+7EdUI/xVE3AdEwyR1dfkfKj2b5AD\nJ5BeWwGEfoPtgYrGt2iycNDe8eJtnbfaKSE9D68p1LZPn6gTIFYzBKSAbRLb\n7Q36AlwVPwPNC8v1CuyCiZjAdNHKYWnduj9lxHxjI0lXwtlPpx7lhLqxawbF\ncnIkPZrwnlEC+DoMcFK468vemhi7KX6scgF0MsH/sZvkLiWliLQxN5azn+hi\niV0+QOAF+2Ap5i/L9fLpVbT0fULm8KfvqRlhDkTju3OVcT3/A2WI4kS+xTdq\nlH8K\r\n=H0V+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCg6u9GnyKmNcUXOnvw5bg5eigwAUwkSLGJZVVdIN/TfgIge7PEXmn7PfqeLx5XZGHO2ghspmazckG38BcoL4hFtXY="}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_5.0.0_1597057242652_0.04730707762697661"},"_hasShrinkwrap":false},"5.1.0":{"name":"postgres-migrations","version":"5.1.0","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","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 && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --exclude='__unit__' --prune-empty-dirs src/ dist/ && 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.3.0","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/bluebird":"^3.5.32","@types/node":"^10.17.28","@types/pg":"^7.14.4","@types/sinon":"^9.0.4","ava":"^3.11.1","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.0.5","sinon":"^9.0.2","ts-node":"^8.10.2","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^3.9.7","typescript-tslint-plugin":"^0.5.5"},"gitHead":"8bf92a58ef2bf8683520f20ea43ff8ca42544580","_id":"postgres-migrations@5.1.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-21wLn5o4OY+rxDh5VdCDqyXkuRmIeG367DAJEwa50ZTpUg0zHuE2APsGMLDZP0VMlYCnmCP4I92akKtiwei+iA==","shasum":"939c16179268dd6522fc51685802110c722f187a","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-5.1.0.tgz","fileCount":43,"unpackedSize":39377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfagk+CRA9TVsSAnZWagAAQT0P/3tUhizFbH5HbVkr2mVK\nOeqAmdUrgd+YWF3feE/CReB/OnuwcY5S41/aOSfFST0XNMf4TX3Qv8silC70\nyMWqwTHugSaGQeXH5pw0fUGMKlzhKSGV366YlopPV+0Gc1uoCXUX49R3xaSd\n4x7SYkefe+izC0Dz6dkKELpfnc3G+iGCAj+GXpSFsJWUV9/nvpUw+oLxB+QS\nfmKa6nPBPTrkgh+9aYzTVf4ToDzb+EW3OzzF20Hffp6DOMmJ+VJUV0IAvstV\nPNiocw4XXETaNnqcJgOETLwCVRtxhSllwUvfDykgQ+U1+Zjblp1ckc8qOiml\nmR/LmAEH4gpBKilDtUyCLnHQEZMtI7AqDUa85Q47jb9beQdmuTsN4dAHm8Cy\nCl+LhzjL0zqkuA8/FuPOCIxB4SJHm2XqKakrskD2Qu754KrRX2i9GUBx2MzY\nbgrcFM1xUjYBfrqZ3l6E4JtaowP1k61RhvH9vqDDdSJ1ycRDfnEyy7ZpRRQ1\n+qqg0EGp6vLcOIpau5nJVsV4iYyy5F6Ns8eFTKPQOmXAFGRUk+JmXi/roxVU\nRsIRe+0buZAhBkUiiSLBRLA7ACzVAs8ljtdMJyBbl+fFKNXlKddnumxMMRut\nkDxD9xEtV28pS7geQxqhvtK4x6m+sM7RVvijuHJxPIvJqLTXgxoehbW9C9J0\noyoL\r\n=oaEO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvMCe8iIVMd2BcLelEeJVuCTXdu+2AqUu4LQ1XbUkQyQIhAIyYVmYMmas3OTLZOeBlipUSj5DsHXb3sOjT1X7UivQr"}]},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_5.1.0_1600784702085_0.7728967526975103"},"_hasShrinkwrap":false},"5.1.1":{"name":"postgres-migrations","version":"5.1.1","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","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 && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --exclude='__unit__' --prune-empty-dirs src/ dist/ && 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.5.1","sql-template-strings":"^2.2.2"},"devDependencies":{"@types/bluebird":"^3.5.33","@types/node":"^10.17.51","@types/pg":"^7.14.8","@types/sinon":"^9.0.10","ava":"^3.15.0","fit-commit-js":"^0.3.2","husky":"^3.1.0","prettier":"^2.2.1","sinon":"^9.2.3","ts-node":"^8.10.2","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^3.9.7","typescript-tslint-plugin":"^0.5.5"},"gitHead":"caba0b3a41a7f191ea28cbda46b1b7e8a1336836","_id":"postgres-migrations@5.1.1","_nodeVersion":"12.18.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-G5QgHhmgOUFJtkNsYi7tYXi2vit9hzJCm+HbsAVa9mhR6tW9lwX/o/s9Rbnx574BVRvkV5+gPWxGAP9l3FyBKg==","shasum":"a1137d9942ded2c9c77be735076b2e7452b06fe4","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-5.1.1.tgz","fileCount":43,"unpackedSize":39378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAerbCRA9TVsSAnZWagAAfc4P/A95/Rk+6dN3wXXauPpG\n87ufapD4q3xzhvdTm418fh20XGCLCGVZVUWTndozRAh9O1SkXCr6fsvtySaS\ntjNLiDEcz7Eo1asFYEdKVtguFwAHCnMM+i5RZoT/M0ZdNQjD8XOTdNoLF1ZT\nC+eGdhPXaTvpvo9S1xU+OSSeEFYP790eF6HUeNM8oKctvH7ItcXvpvyVadp/\nUr8YvD26jWzsgWne/+YyEoXXfd2yZ/az5fFL0xKMnkkLcRRV8myE/fO+K3Qi\n0O+KcrGPviUIkJNSYLTbzFxl6veP6Ph0mirF2DMPogWajsn1eIzdPz0Kdacc\nqmoNYdQTUBJF/d/evam9sAiV6qiReSKSx+2DRcTrowDCXlxJh9j/D2J+nA6i\navw+ABa/WY95QAvVNUf3Q7/Ir/5BY3W6ivceRgghHtwDwxzbTocJQBeDjCJ6\nMblMdY0e9pmFkKYRMAjwgbELSjLKCfESQCddLBoE0Rq+DWgsbJdUNgKFKssC\n4fnplLZITpvmz1HpDjreVS2VBM13tW2PfmAjVb2mACEwISoc6xdZQywubWzf\nwGctbzhyUMKJXBF0kFRJ0vXmZDfb1rf35NKMRyuI4DHrGsZ9x45v8PkrxZVR\ni4t18mSUQl8i12ZoHi8x1xaRn5yAaRwj8vlDgekExS1h9R0uoAs7b9MCzcwL\nbVp0\r\n=fgvJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuRa5QDDquuTO8hdna1Hjl2fHYy159qO9AmExIvQxjXQIgBfOYr4QrWJ76SuaJqM4jH3JgQShKnld38woq6PQDa0g="}]},"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_5.1.1_1610738394370_0.14735932270955576"},"_hasShrinkwrap":false},"5.2.0":{"name":"postgres-migrations","version":"5.2.0","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","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 && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --exclude='__unit__' --prune-empty-dirs src/ dist/ && 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":"0785dd674456a42113edf2f3581738f473d384c8","_id":"postgres-migrations@5.2.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-/qeCRAxKzdE6/g76xiyav8QhGigqCrpqIPhMWzWAMyjG3gSkQpNlbm7PeOxQETZ9wOGRoBeYEKBDBBbMCm34vA==","shasum":"729f3d27251dd6d4fb12f61ca7f7246bfb889c97","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-5.2.0.tgz","fileCount":44,"unpackedSize":40540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0iczCRA9TVsSAnZWagAA1/4P/jQHtNw21ScZ3StWAcBc\nej26XDh3SVsWiFOD+Uiwu2T3gYKefCzTt6PYbgF38Vc3RboK2RBtJAqh2u2U\nwrhRIRMPHiI8OLnM8lD5jsqll1PFLNZLS0OEZ46nN4wo+NfbcPVEJDnZ/UT9\n2WHKPx7IS3SLqia05dw2epSVa6/63O5JwCp8ON3laAr4yM6BqpkqXX3TXUeW\nLfEpa9klHh6BMqoCnQPmRkexfVu5YkyIO4f8fF6aAmTf2NDqrESYDYzkwBAI\nvVmOiUuNwn2Img8+3gess+VT5c2OzwfVcPpQwlyA41UgDabUDxBWN1kp74QQ\nqV2YAKOtB0QlzrXGq8c3KoSRBKr2XywZmAPEjfZJZS3xPwMwr7WvQHAc1R6E\n0OIal5yjG10h03hkHLwV+UgQHGZZQWwjiJgLwJwaJ3HcdaLzsnh/J84mH5ag\nXjkijMKGVBeyfyxDIWvCjDS2tUyhU6hjG2M9w2E8khawj2162gbT5fBIVcDc\nnooPra+CWhvzt3CJa6vgTPqfmWGSx66+F3aZEzQNTwrOjamgXMWBz/gEnsUj\n3heecdjBwl/Hny6RCrb0SzkFTzXKeDdL9aTjQOUasqpGrX0miHaIeip6Nudv\nuhZok6Ci3jP/YOvxts8c6tVHrTdvo0WrfjZ5mvTUX+sERrU8O32WYK+VyghF\nH4BO\r\n=Blyi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpyFTv57gpIVqdMSMoYhXqPD9ghS4A8TxUhst/WNnK3AIhALWVUYq8dN3Xr4jQOUiR4iljoUu1EwP0mcA1Q/ZTLtyW"}]},"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_5.2.0_1624385330811_0.5502223422005827"},"_hasShrinkwrap":false},"5.3.0":{"name":"postgres-migrations","version":"5.3.0","description":"Stack Overflow style database migrations for PostgreSQL","main":"dist/index.js","types":"dist/index.d.ts","bin":{"pg-validate-migrations":"dist/bin/validate.js"},"author":{"name":"Thom Wright"},"keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"homepage":"https://github.com/thomwright/postgres-migrations#readme","license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"bugs":{"url":"https://github.com/thomwright/postgres-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 checkPushed && npm test && npm run build","check-formatting":"prettier '**/*.ts' --list-different","fix-formatting":"prettier '**/*.ts' --write","lint":"npm run tslint && npm run check-formatting","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 && npm run test-integration","preversion":"npm test","build":"rm -rf ./dist && rsync -a --exclude='*.ts' --exclude='__tests__' --exclude='__unit__' --prune-empty-dirs src/ dist/ && 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":"0314717564d312b93601770f182ba2e40e926823","_id":"postgres-migrations@5.3.0","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-gnTHWJZVWbW8T3mXIxJm1JRU853TqBVWkhgfsTJr7zqT3VexjRmJj9kNi96rVhfTezDU4FVW6pf701kLOZiKIA==","shasum":"3a8a98f25994e95f0a79de7f315d086fcfc51b94","tarball":"https://registry.npmjs.org/postgres-migrations/-/postgres-migrations-5.3.0.tgz","fileCount":44,"unpackedSize":43122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9rF9CRA9TVsSAnZWagAAn18P/2bFuki+Z4yPmwLOTOEb\nCklGydcZmSY2KznTNKAw80u4EdeQiDOfiZLARDBru6Qf8UvtJ5q8lQNOS2cJ\nP2UC9GkcbMetWeG62wBA23EmI0tcAzEtj44poUpWU3X71SLNTdNHPibVkTfK\nKIiNDqcwBnv+OMdaNZ0M7e6nLEtjRCOCBvVBOUe90g2ArNFkKkCN2t3UyaRD\n/8ZQ2n3lzxRoV2L2r4drURTkiXUQ5/uRCm5S3dW8xZoexcnN7Be81oXl9WHD\nMpuk2bcA3NqLcrDG+d9LRi4WkkKl9t4hZh9c8+XpM3+fLLrS2lU2CTUNYiZp\n6QUUeuepaniG+ZThy8IiZzx/WdEkmeusMYeToXqoHJzanRV6OfFA/rNXTv7e\naXvfetQ8HSBYDV+E52EDUlhp69m8QBIbxyMwO9evBL3bRSXy7jZVYiaY2bwt\njNGUcnvtf14+cBGYXu8ecXGSPM6sfrUXqv3OW8GK30PT+rg0Kq9ii+cmeO6E\nNptaluL14tja2eBCUoo6c2Ak3TZ4mRMa62/RoFgnyPid55pK7PqTvcRHdkN8\nmTmhTfp5277iUEwPbHpOMjhu4kV/Swfz+J4HpPzDxs8LcO9tqqrfPS1uG2kZ\nFQ8m+qX82bkI3jEBKunl0wqHJ/cykrsPwedmqqtOXgtLRssVLsjhbh5sM5UY\ncD/S\r\n=HAJ6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP0RG3LRlnWYcFBt+6nlUnwrMEuQ/Jm0VXkq1hldrcbAIgIvlGmEejrhObcc3CNKSbFdRm2ejDEUDOKMJ12/1G6ZE="}]},"_npmUser":{"name":"thomwright","email":"npm@thomwright.co.uk"},"directories":{},"maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postgres-migrations_5.3.0_1626780029134_0.13619532856255945"},"_hasShrinkwrap":false}},"readme":"# 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```text\nmigrations\n├ 1_create-table.sql\n├ 2_alter-table.sql\n└ 3_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 \"postgres-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  await migrate(dbConfig, \"path/to/migration/files\")\n}\n```\n\nOr, pass a `pg` client:\n\n```typescript\nimport {migrate} from \"postgres-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  // 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\")\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├ 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├ 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","maintainers":[{"name":"thomwright","email":"npm@thomwright.co.uk"}],"time":{"modified":"2022-05-13T07:01:36.584Z","created":"2017-10-09T14:28:02.179Z","1.0.0":"2017-10-09T14:28:02.179Z","2.0.0":"2018-03-15T17:12:00.253Z","2.0.1":"2018-04-03T16:36:24.598Z","2.0.2":"2018-05-15T09:19:05.541Z","2.0.3":"2018-05-15T09:40:27.482Z","3.0.0":"2019-01-02T16:05:47.148Z","3.0.1":"2019-02-08T14:02:00.103Z","3.0.2":"2019-03-27T11:49:24.886Z","4.0.0-beta.0":"2019-12-17T10:17:10.989Z","4.0.0-beta.1":"2019-12-17T10:37:05.887Z","4.0.0":"2020-01-03T09:52:57.736Z","4.0.1":"2020-01-31T15:02:11.306Z","4.0.2":"2020-01-31T15:39:20.663Z","4.0.3":"2020-04-06T16:11:13.428Z","5.0.0":"2020-08-10T11:00:42.837Z","5.1.0":"2020-09-22T14:25:02.301Z","5.1.1":"2021-01-15T19:19:54.561Z","5.2.0":"2021-06-22T18:08:50.940Z","5.3.0":"2021-07-20T11:20:29.295Z"},"homepage":"https://github.com/thomwright/postgres-migrations#readme","keywords":["postgres","postgresql","migration","migrations","sql","database","db"],"repository":{"type":"git","url":"git+ssh://git@github.com/thomwright/postgres-migrations.git"},"author":{"name":"Thom Wright"},"bugs":{"url":"https://github.com/thomwright/postgres-migrations/issues"},"license":"MIT","readmeFilename":"README.md"}