Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Execute Code During Yii Startup (Before First Action)

$
0
0
Hi,

i have a webapplication which upgrades themself its database. (so users have only copy the files of the new application version and db upgrading is done automatically)
i have extended the MigrateCommand-class to use the integrated yii migration feature. this works fine.

my problem is:
i have to execute this db-migration code. (first check if db upgrade is required and ugrade if necessary)
it would be great to execute it directly before the first action is called. this means i already need all yii functions for db-migration, but it should be executed BEFORE the action.

is there any documention about the start process of YII? maybe i can extend some class and inject my db-upgrade code

Viewing all articles
Browse latest Browse all 18717