| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 6 | public function up() |
||
| 7 | { |
||
| 8 | if (Yii::app()->db->schema->getTable('display_mode') !== null) |
||
| 9 | return; |
||
| 10 | |||
| 11 | // SQLite cannot add foreign keys after a table has been created so |
||
| 12 | // we'll have to do it in the definition |
||
| 13 | $this->createTable('display_mode', array( |
||
| 14 | 'id'=>'pk', |
||
| 15 | 'user_id'=>'integer NOT NULL REFERENCES user(id) ON UPDATE CASCADE ON DELETE CASCADE', |
||
| 16 | 'context'=>'string NOT NULL', |
||
| 17 | 'mode'=>'string NOT NULL' |
||
| 18 | )); |
||
| 27 |