TypeScript and Modern JavaScript Support
TypeScript and modern JavaScript are supported out of the box via jiti.
Usage
You can add a script to your package.json:
jsonc
{
"scripts": {
// ..
"migrate": "node-pg-migrate",
},
}TypeScript and JavaScript migration files are picked up automatically. When creating a new migration, choose TypeScript with -j ts/--migration-file-language ts (only valid on the create command):
bash
npm run migrate create my-migration -j tsNow you can run migrations with:
bash
npm run migratebash
pnpm run migratebash
yarn migratebash
bun run migrate