Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function up() |
||
29 | { |
||
30 | $table = Yii::app()->db->schema->getTable($this->getTableName()); |
||
31 | |||
32 | if ($table === null) |
||
33 | return false; |
||
34 | |||
35 | // Check if column already exists |
||
36 | $columns = $table->getColumnNames(); |
||
37 | |||
38 | if (!in_array($this->getColumnName(), $columns)) |
||
39 | $this->addColumn($this->getTableName(), $this->getColumnName(), $this->getColumnType()); |
||
40 | } |
||
51 |