I was wondering whether this is a recommended flow:
I use Gii to create models based on my tables.
I name the models as yii*, e.g. yiiPost.
I extend yiiPost through Post and carry out further customisations in Post.
This is inspired in part by symfony (as much as I understood from its Jobeet tutorial) and because my tables are not yet frozen. As the requirements keep changing, I find myself regenerating the model classes and then working with the diff output to write new changes. In particular, the relations() keep getting left behind as in my rush, I do not update relations in models where I know I won’t be using them. With this two-step way, since the original files are not modified, getting them regenerated will be a simpler faster job.
How do you (or rather what is the accepted way) handle tables whose design may change during development?
Migrations is neat! Definitely useful when I sync the project between home and office. Is there any way to call the migrations from the application, say, the admin interface? Because our hosting does not have shell access.
That’s good to hear regarding the base class idea. Also, for the current future, we don’t have shell access to the host, so I would be playing with Migration on local machines only.