This is my 3rd try of get answers about it. The first was in a e-mail list, another in a portuguese list and finally here. I really would appreciate any of your opinions.
I started to study Yii Database Migrations just to get impressed in how much it is a manual work. I dont think that I should be doing editing/creation of so many migrations just to syncronize my database with my application. It is (IMO) a duplicated work since i have to make my db changes in a workbench tool and turn it into migration codes. I just would need forget about to do it one time to have problems on migrate.
What I am doing? I am using Git Hooks.
I created a script that before every commit generates a copy of the db (a sql file via mysqldump), puts it in protected/data, adds to commit, and, finally, commits it. I just continue to use ‘git commit’. I dont need learn new things, I nor even would be able to forget it cause it is an automatic. Every time I do a checkout, my sql file containing the state of the database is there just waiting for me. I just need to put the script in the specific folder and it is done.
Note: it is possible choose to save structure and/or data and it is also possible to make a script to recover automatically the database on a git checkout.
So, I really would like to know: what are the good things I am loosing about yii migrations? What about git hooks? What do you think to be the pros and cons?
Really would appreciate your opinion. I feel should there to be something very good in migrations yii that I have not found till now and I really would love to find.
Thanks in advance.