public function __construct($columnName, $defaultValue, $enumValues) { if ($defaultValue === null || !in_array($defaultValue, $enumValues)) { throw new \Rhubarb\Stem\Exceptions\SchemaException("The enum column does not have a default matching one of the enum values."); } parent::__construct($columnName, $defaultValue); $this->enumValues = $enumValues; }
public function addColumn(Column $column) { $columns = func_get_args(); $specificColumns = []; foreach ($columns as $column) { $specificColumns[] = $column->getRepositorySpecificColumn("MySql"); } call_user_func_array("parent::addColumn", $specificColumns); foreach ($specificColumns as $column) { if (method_exists($column, "getIndex")) { $index = $column->getIndex(); if ($index !== false) { $this->addIndex($index); } } } }
public function __construct($columnName) { parent::__construct($columnName, $this->getNewContainerObject()); }