You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really nice to be able to run migrations that apply to the current environment. The implementation could be similar to how Loopback currently deals with environment based configs. For example, if you only want to run a migration on stage you could name you file 0001-migration.stage.js or if you only wanted to run it on production, it would be 0001-migration.production.js.
The text was updated successfully, but these errors were encountered:
@sundeepgupta In general, I agree that migrations should run on all environments but it does depend on what the migration is doing. In my case I was using them to add data to the database. At the time, i was trying to setup up a fully functional dev environment (including dummy data) so that coworkers could get the app running without having to manually add anything. However, as this was dummy data, i didn't want it in production.
I know i could add environment checks in the migrations but i thought it could be quite nice to take the existing concept of appending the environment name to the filename.
It would be really nice to be able to run migrations that apply to the current environment. The implementation could be similar to how Loopback currently deals with environment based configs. For example, if you only want to run a migration on stage you could name you file
0001-migration.stage.js
or if you only wanted to run it on production, it would be0001-migration.production.js
.The text was updated successfully, but these errors were encountered: