'default' => '', 'cast' => $this->_cast, 'column_view_namespace' => $this->_columnViewNamespace, 'searchLogic' => $this->_searchLogic,
'allow_null' => true,
'can' => $this->_can, 'auth' => $this->_auth,
+ 'database_unique' => $this->_databaseUnique, 'database_index' => $this->_databaseIndex,
'fake' => false, 'store_in' => 'extras', 'attributes' => []];
}
CubistMagicAbstractModel::toDoctrineType($this->getDatabaseType()),
$attributes
);
- if ($this->_databaseUnique) {
+ if ($this->getAttribute('database_unique', false)) {
$table->addUniqueIndex([$name]);
}
- if ($this->_databaseIndex) {
+ if ($this->getAttribute('database_index', false)) {
$table->addIndex([$name]);
}
}