mohammedniyasm/e-commerce ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Go tool for database migrations, something I can use both from the command line and from my own Go app.
I want it to read migration files from a folder, run them in the right order, and support both moving forward and rolling back. It should work cleanly with a PostgreSQL database, and be set up so it could support other databases and remote migration sources later. A simple CLI is enough, with commands like up and down, and it should handle stopping safely if I hit ctrl c so it doesn’t leave the database in a bad state.
If it makes sense, include a tiny example app or sample usage so I can see how to call it from Go. Keep the setup straightforward, with environment config and a sample migration folder, and look up current docs online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit