Open eddiejaoude opened 13 years ago
Is this best done with a module (therefore views, which could create a security issue) or as CLI scripts (/data/migrations/)?
After some thoughts i am warming towards having a module. The view will have a tool bar that would make it easier for the admin to administer the migrations, i.e. Update to revision (or latest), current database revision, possibly an audit trail (history of actions)
I don't see the need for a module for migrations as this could become a problem to access the app if you changed the database. So migrations should be executed during the deploy of the app and not afterwards.
During development this is useful especially with multiple developers. I do see what you mean on a production server, however do you not think it would be useful when doing updates, one can update the code and then update the database, and if there are any problems, role back the code & the database more easily?
I get your point, but its very easy to do this command line. And if there is something wrong its likely that you can't access the app.
Yes the command line is easy to do too & you are right about if something goes wrong with the application. Where would be the best place to put these files to access via the command line? The library directory does not feel right.
I would create a bin directory in the root folder and place the migration script there. The migrations I would place in another directory database or migrations.
Sounds like a good idea. I will give it ago, thanks :)
Setup database migrations