return new $class($attributes);
}
+ public function getDatabaseType()
+ {
+ if ($this->_translatable) {
+ return 'text';
+ }
+ return $this->_databaseType;
+ }
+
protected static function _getClass($type)
{
$type = Str::studly($type);
public function defineDbColumn($table)
{
$name = $this->getAttribute('name');
- $table->addColumn($name, CubistMagicAbstractModel::toDoctrineType($this->_databaseType), $this->_databaseAttributes);
+ $table->addColumn($name, CubistMagicAbstractModel::toDoctrineType($this->getDatabaseType()), $this->_databaseAttributes);
if ($this->_databaseUnique) {
$table->addUniqueIndex([$name]);
}