Database "migration"
Rate Topic:

My company has its own crm/ticket management system. It was created in early 90's and its peace of crap...
It uses mySql database, there are no relations between the tables, indexes are scarce, the DB exceeds 12GB, holding who knows how much crap data...

Im the 'lucky' one trying to make heads and tails out of it, hopefully changing it into well designed relational database with yii based app on top.

Due to the fact that the nasty DB is still in use and can not be changed for time being, I'm forced to use two databases, chunky one in read-only mode, and clean one in rw mode.

I would like to ask you, as more experienced yii developers, what would be the best way for approaching the task of recreating the table structure in new DB, in yii way, using proper relations and proper indexes.