src/db/Migration.php
public function deleteEnumValue ($table, $column, $value, $default = null)
		{
			echo "    > delete enum value $value from column $column in $table ...\n";
			$time = microtime(true);

			$columnSchema = $this->db->getTableSchema($table)->columns[ $column ];
			$values = $columnSchema->enumValues;
			$key = array_search($value, $values);
			if ($key === false)
				throw new Exception("Cannot find value $value in enum values " . implode(", ", $values) . ".");
			unset($values[ $key ]);
			$defaultValue = $default ? $default : $columnSchema->defaultValue;
			$this->alterColumn($table, $column, $this->enum($values)->defaultValue($defaultValue));

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

			$columnSchema = $this->db->getTableSchema($table)->columns[ $column ];
			$values = $columnSchema->enumValues;
			$key = array_search($value, $values);
			if ($key === false)
				throw new Exception("Cannot find value $value in enum values " . implode(", ", $values) . ".");
			unset($values[ $key ]);
			$defaultValue = $default ? $default : $columnSchema->defaultValue;
			$this->alterColumn($table, $column, $this->enum($values)->defaultValue($defaultValue));

			echo '    > done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
		}
public function deleteEnumValue ( $ table , $ column , $ value , $ default = null ) { echo "    > delete enum value $value from column $column in $table ...\n" ; $ time = microtime ( true ) ; $ columnSchema = $ this -> db -> getTableSchema ( $ table ) -> columns [ $ column ] ; $ values = $ columnSchema -> enumValues ; $ key = array_search ( $ value , $ values ) ; if ( $ key === false ) throw new Exception ( "Cannot find value $value in enum values " . implode ( ", " , $ values ) . "." ) ; unset ( $ values [ $ key ] ) ; $ defaultValue = $ default ? $ default : $ columnSchema -> defaultValue ; $ this -> alterColumn ( $ table , $ column , $ this -> enum ( $ values ) -> defaultValue ( $ defaultValue ) ) ; echo '    > done (time: ' . sprintf ( '%.3f' , microtime ( true ) - $ time ) . "s)\n" ; }
Deletes value from enum column.

@param string $table Table name.
@param string $column Column name.
@param string $value Value to be removed from column.
@param null   $default New default value. If null the old one will be used.

@throws \yii\db\Exception
Deletes value from enum column .