├── .circleci └── config.yml ├── .github └── ISSUE_TEMPLATE │ └── bug_report.md ├── .gitignore ├── .husky └── pre-commit ├── .mocharc.json ├── .npmignore ├── .npmrc ├── .prettierignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── docker-compose.yml ├── eslint.config.mjs ├── examples ├── mssql.js ├── mysql.js └── pg.js ├── lib ├── Client.js ├── MssqlClient.js ├── MysqlClient.js ├── PostgresClient.js ├── Sqlite3Client.js ├── createClient.js └── utils.js ├── package.json ├── postgrator.d.ts ├── postgrator.js ├── test ├── api.js ├── api.ts ├── drivers.js ├── duplicateMigrations │ ├── 001.do.sql │ ├── 001.undo.sql │ ├── 002.do.another-description.sql │ ├── 002.do.some-description.sql │ ├── 002.undo.another-description.sql │ └── 002.undo.some-description.sql ├── failMigrations │ ├── 001.do.sql │ ├── 001.undo.sql │ ├── 002.do.fail-test.sql │ └── 002.undo.fail-test.sql ├── migration-duplicates.js ├── migration-failure.js ├── migrations │ ├── 001.do.sql │ ├── 001.undo.sql │ ├── 002.do.some-description.sql │ ├── 002.undo.some-description.sql │ ├── 003.do.sql │ ├── 003.undo.sql │ ├── 004.do.sql │ ├── 004.undo.sql │ ├── 005.do.cjs │ ├── 005.undo.cjs │ ├── 006.do.cjs │ ├── 006.undo.cjs │ └── create.sql ├── test-util.js └── utils.js └── tsconfig.json /.circleci/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/.circleci/config.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .DS_Store 3 | .env 4 | .zedstate 5 | 6 | .idea/ 7 | *.iml -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npm run precommit 2 | -------------------------------------------------------------------------------- /.mocharc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/.mocharc.json -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/.npmignore -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/.prettierignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/README.md -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/eslint.config.mjs -------------------------------------------------------------------------------- /examples/mssql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/examples/mssql.js -------------------------------------------------------------------------------- /examples/mysql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/examples/mysql.js -------------------------------------------------------------------------------- /examples/pg.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/examples/pg.js -------------------------------------------------------------------------------- /lib/Client.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/lib/Client.js -------------------------------------------------------------------------------- /lib/MssqlClient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/lib/MssqlClient.js -------------------------------------------------------------------------------- /lib/MysqlClient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/lib/MysqlClient.js -------------------------------------------------------------------------------- /lib/PostgresClient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/lib/PostgresClient.js -------------------------------------------------------------------------------- /lib/Sqlite3Client.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/lib/Sqlite3Client.js -------------------------------------------------------------------------------- /lib/createClient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/lib/createClient.js -------------------------------------------------------------------------------- /lib/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/lib/utils.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/package.json -------------------------------------------------------------------------------- /postgrator.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/postgrator.d.ts -------------------------------------------------------------------------------- /postgrator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/postgrator.js -------------------------------------------------------------------------------- /test/api.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/api.js -------------------------------------------------------------------------------- /test/api.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/api.ts -------------------------------------------------------------------------------- /test/drivers.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/drivers.js -------------------------------------------------------------------------------- /test/duplicateMigrations/001.do.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/duplicateMigrations/001.do.sql -------------------------------------------------------------------------------- /test/duplicateMigrations/001.undo.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/duplicateMigrations/001.undo.sql -------------------------------------------------------------------------------- /test/duplicateMigrations/002.do.another-description.sql: -------------------------------------------------------------------------------- 1 | 2 | -- Test 1 insert 3 | INSERT INTO person (name, age) VALUES ('bob', 40); -------------------------------------------------------------------------------- /test/duplicateMigrations/002.do.some-description.sql: -------------------------------------------------------------------------------- 1 | 2 | -- Test 1 insert 3 | INSERT INTO person (name, age) VALUES ('fred', 30); -------------------------------------------------------------------------------- /test/duplicateMigrations/002.undo.another-description.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/duplicateMigrations/002.undo.another-description.sql -------------------------------------------------------------------------------- /test/duplicateMigrations/002.undo.some-description.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/duplicateMigrations/002.undo.some-description.sql -------------------------------------------------------------------------------- /test/failMigrations/001.do.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE widgets ( 2 | name VARCHAR(50) 3 | ); -------------------------------------------------------------------------------- /test/failMigrations/001.undo.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE widgets; -------------------------------------------------------------------------------- /test/failMigrations/002.do.fail-test.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/failMigrations/002.do.fail-test.sql -------------------------------------------------------------------------------- /test/failMigrations/002.undo.fail-test.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/failMigrations/002.undo.fail-test.sql -------------------------------------------------------------------------------- /test/migration-duplicates.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migration-duplicates.js -------------------------------------------------------------------------------- /test/migration-failure.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migration-failure.js -------------------------------------------------------------------------------- /test/migrations/001.do.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/001.do.sql -------------------------------------------------------------------------------- /test/migrations/001.undo.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/001.undo.sql -------------------------------------------------------------------------------- /test/migrations/002.do.some-description.sql: -------------------------------------------------------------------------------- 1 | 2 | -- Test 1 insert 3 | INSERT INTO person (name, age) VALUES ('fred', 30); -------------------------------------------------------------------------------- /test/migrations/002.undo.some-description.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/002.undo.some-description.sql -------------------------------------------------------------------------------- /test/migrations/003.do.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/003.do.sql -------------------------------------------------------------------------------- /test/migrations/003.undo.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/003.undo.sql -------------------------------------------------------------------------------- /test/migrations/004.do.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO person (name, age) VALUES ('holly', 50); 2 | -------------------------------------------------------------------------------- /test/migrations/004.undo.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM person WHERE name = 'holly'; -------------------------------------------------------------------------------- /test/migrations/005.do.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/005.do.cjs -------------------------------------------------------------------------------- /test/migrations/005.undo.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/005.undo.cjs -------------------------------------------------------------------------------- /test/migrations/006.do.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/006.do.cjs -------------------------------------------------------------------------------- /test/migrations/006.undo.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/006.undo.cjs -------------------------------------------------------------------------------- /test/migrations/create.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/migrations/create.sql -------------------------------------------------------------------------------- /test/test-util.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/test-util.js -------------------------------------------------------------------------------- /test/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/test/utils.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rickbergfalk/postgrator/HEAD/tsconfig.json --------------------------------------------------------------------------------