|
@@ 91-95 (lines=5) @@
|
| 88 |
|
} |
| 89 |
|
|
| 90 |
|
// Enforcing 1 hook per table column |
| 91 |
|
if (array_key_exists($columnName, $hookMap)) { |
| 92 |
|
$message = "Hook is trying to register on an already registered column \"$columnName\", "; |
| 93 |
|
$message .= "do you have conflicting traits?"; |
| 94 |
|
throw new ActiveRecordException($message, 0); |
| 95 |
|
} |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
/** |
|
@@ 208-212 (lines=5) @@
|
| 205 |
|
} |
| 206 |
|
|
| 207 |
|
// Enforcing table can only be extended with new columns |
| 208 |
|
if (array_key_exists($columnName, $this->tableDefinition)) { |
| 209 |
|
$message = "Table is being extended with a column that already exists, "; |
| 210 |
|
$message .= "\"$columnName\" conflicts with your table definition"; |
| 211 |
|
throw new ActiveRecordException($message, 0); |
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
$this->tableDefinition[$columnName] = $definition; |
| 215 |
|
} |