|
@@ 182-189 (lines=8) @@
|
| 179 |
|
continue; |
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
if (empty($this->dbtypemap[$property->dbtype])) { |
| 183 |
|
$mapping = $this->parse_dbtype($property); |
| 184 |
|
} else { |
| 185 |
|
$mapping = $this->dbtypemap[$property->dbtype]; |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
if ($property->unique) { |
| 189 |
|
if ($property->name == 'guid') { |
| 190 |
|
$mapping['unique'] = true; |
| 191 |
|
} else { |
| 192 |
|
//we can't set this as a real DB constraint because of softdelete and tree hierarchies |
|
@@ 249-254 (lines=6) @@
|
| 246 |
|
} |
| 247 |
|
} elseif (strpos($property->dbtype, 'set') === 0) { |
| 248 |
|
// see http://docs.doctrine-project.org/en/latest/cookbook/mysql-enums.html |
| 249 |
|
if (!empty($this->dbtypemap[$property->type])) { |
| 250 |
|
$mapping = $this->dbtypemap[$property->type]; |
| 251 |
|
$mapping['comment'] = $property->dbtype; |
| 252 |
|
return $mapping; |
| 253 |
|
} |
| 254 |
|
} elseif (strpos(strtolower($property->dbtype), 'decimal') === 0) { |
| 255 |
|
$matches = array(); |
| 256 |
|
preg_match('/DECIMAL\((\d+),(\d+)\)/i', $property->dbtype, $matches); |
| 257 |
|
$mapping = array( |