src/db/Migration.php
public function addEnumValue ($table, $column, $value, $default = false)
		{
			echo "    > add enum value $value to column $column in $table ...\n";
			$time = microtime(true);

			$columnSchema = $this->db->getTableSchema($table)->columns[ $column ];
			$values = $columnSchema->enumValues;
			$values[] = $value;
			$defaultValue = $default ? $value : $columnSchema->defaultValue;
			$this->alterColumn($table, $column, $this->enum($values)->defaultValue($defaultValue));

			echo '    > done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
		}
public function addEnumValue ($table, $column, $value, $default = false)
		{
			echo "    > add enum value $value to column $column in $table ...\n";
			$time = microtime(true);

			$columnSchema = $this->db->getTableSchema($table)->columns[ $column ];
			$values = $columnSchema->enumValues;
			$values[] = $value;
			$defaultValue = $default ? $value : $columnSchema->defaultValue;
			$this->alterColumn($table, $column, $this->enum($values)->defaultValue($defaultValue));

			echo '    > done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
		}
public function addEnumValue ( $ table , $ column , $ value , $ default = false ) { echo "    > add enum value $value to column $column in $table ...\n" ; $ time = microtime ( true ) ; $ columnSchema = $ this -> db -> getTableSchema ( $ table ) -> columns [ $ column ] ; $ values = $ columnSchema -> enumValues ; $ values [ ] = $ value ; $ defaultValue = $ default ? $ value : $ columnSchema -> defaultValue ; $ this -> alterColumn ( $ table , $ column , $ this -> enum ( $ values ) -> defaultValue ( $ defaultValue ) ) ; echo '    > done (time: ' . sprintf ( '%.3f' , microtime ( true ) - $ time ) . "s)\n" ; }
Adds value to enum column.

@param string $table Table name.
@param string $column Column name.
@param string $value New value in enum.
@param bool   $default Whether to set new value as default.
Adds value to enum column .