Gii: Unable To Create Model For Am Old Table With Bad Column Name

An idiot choosen to call a table column ‘FLAG-MM’. A lot of old code is using this hardcoded in tens of sql call, and we must keep working for other some month.

I’m refactoring, using Yii, the old app, so now I need a model for this table.

Is there a workaround to be able to use Yii with this table?

I was thinking to clone every night the table into another table with ‘good’ column names… but this add a ‘time lapse gap’ beetween old and new app. Of course, in 2 monthes the old app will be erased, so I can use only a directly the new one… but… it’s not a thing I like.

Any ideas?

Does your DBMS support writable views?

I don’t know … I’ve never used before.

I’m using mysql with myisam only.

Fine. Give it a try.