{"repo":"salsita/node-pg-migrate","free":true,"listed":false,"github":"https://github.com/salsita/node-pg-migrate","clone":"git clone https://github.com/salsita/node-pg-migrate.git","description":"Node.js database migration management for PostgreSQL","language":"TypeScript","stars":1475,"topics":["database","db","migrate","migration","migrations","migrator","db-migrate","pg","postgre","postgres"],"license":"MIT","category":"databases-storage","readme_excerpt":"node-pg-migrate Node.js database migration management built exclusively for postgres. (But can also be used for other DBs conforming to SQL standard - e.g. CockroachDB.) Maintainers Active Name GitHub --------------------- ---------------------------------------------- Christopher Quadflieg @Shinigami92 Breno A. @brenoepics Omar Diab @osdiab Former Name Link ---------------- ----------------------------------------------- Theo Ephraim @theoephraim Salsita Software salsita.ai Preconditions - Node.js 22 or higher - PostgreSQL 14 or higher (lower versions may work but are not supported officially) If you don't already have the pg library installed, you will need to add pg as either a direct or dev dependency Installation Installing this module adds a runnable file into your node modules/.bin directory. If installed globally (with the -g option), you can run node-pg-migrate and if not, you can run ./node modules/.bin/node-pg-migrate.js Quick Example Add \"migrate\": \"node-pg-migrate\" to scripts section of your package.json so you are able to quickly run commands. Run npm run migrate create my-first-migration . It will create file xxx my-first-migration.js in migrations folder. Open it and change contents to: Save migration file. Now you should put your DB connection string to DATABASE URL environment variable and run npm run migrate up . (e.g. DATABASE URL=postgres://test:test@localhost:5432/test npm run migrate up ) You should now have two tables in your DB :tada: If you want to c","default_branch":null,"files":null,"tree":[],"storefront":"/r/salsita","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/salsita/node-pg-migrate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}