cli
cli copied to clipboard
Add option for a dry run
Some other migration frameworks such as node-db-migrate offer a --dry-run option. This simply prints out all the SQL statements that would be run, but does not actually touch the database.
This can be a very useful check prior to running a migration on a database with real data. It also can be a bit of a sanity checker, unlike normal database queries, migrations are difficult to write tests for. So this would also allow developers to actually verify that their migration file runs, without running it.
I'd be happy to work on a PR with some direction on where to get started, would this involve changes in Sequelize?
+1
+1
+1
+1
+1
+1
+1
There has to be a way to do this, now, I'd think. Even if it's not officially supported, it would seem as though you could call a few private methods or, something, to get the query generation without the execution. Either way, I'll look into it, but wanted to register my +1 anyway.
+1
+1
+1
+1
+1
+1
+1
+1,000
+1
+1
This is definitely a necessary feature.
And put db:sync --dry-run into sequelize-cli as option!
Also need option for sync() API like this: sequelize.sync({ dry: true, force: true });
Please some workaround for this?
Is there any latest news?
What is the status here ???? From 2015 until noooww !
Bumping for more attention!!!