salsita/node-pg-migrate ? reverse-engineered prompt
Reverse engineered prompt
Build me a Node.js migration tool for PostgreSQL that lets me create and run database migrations from the command line.
I want to be able to generate new migration files, write simple up and down steps in them, and then apply or roll back migrations against a database using a connection string from the environment. It should feel easy to use, like a small wrapper around SQL, so I can define things like tables, columns, indexes, constraints, and raw SQL when needed without a lot of extra ceremony.
Please make it work well with PostgreSQL, and keep it flexible enough that it can also handle other SQL based databases like CockroachDB. Include good docs, example migrations, and a clean developer setup so I can test it locally. If you need to check current library docs or best practices, look them up online as you go.
Are you gonna build this?
make sure you review the code using arcumet