This is a very basic migration tool used to sync tables between environments (eg, production, staging, development).
Make sure you set your environment variable (process.env.NODE_ENV.
How to Use
- Install npm package:
npm i node-sql-migrate
- Create a folder
SQLin the root of your Node.js application.
- Create another folder
migrations. This is where you will store your migration files.
- Inside the
migrationsfolder, create files
2-migrate.sqland so on. Do not redo previous migration files.