protected function updateColumn($name, \Doctrine\DBAL\Schema\ColumnDiff $col) {
		$res = "\n\t\$table->changeColumn('$name', [";

		$type_changed = in_array('type', $col->changedProperties);
		foreach($col->column->toArray() as $propName=>$prop) {
			if(($type_changed && $prop && $propName !== 'name') || in_array($propName, $col->changedProperties)) {
				if($propName === 'type')
					$res .= "\n\t\t'$propName' => '".strtolower($prop)."',";
				else
					$res .= "\n\t\t'$propName' => '$prop',";
			}
		}
		$res .= "\n\t]);";

		return $res;
	}
protected function updateColumn($name, \Doctrine\DBAL\Schema\ColumnDiff $col) {
		$res = "\n\t\$table->changeColumn('$name', [";

		$type_changed = in_array('type', $col->changedProperties);
		foreach($col->column->toArray() as $propName=>$prop) {
			if(($type_changed && $prop && $propName !== 'name') || in_array($propName, $col->changedProperties)) {
				if($propName === 'type')
					$res .= "\n\t\t'$propName' => '".strtolower($prop)."',";
				else
					$res .= "\n\t\t'$propName' => '$prop',";
			}
		}
		$res .= "\n\t]);";

		return $res;
	}
protected function updateColumn ( $ name , \ Doctrine \ DBAL \ Schema \ ColumnDiff $ col ) { $ res = "\n\t\$table->changeColumn('$name', [" ; $ type_changed = in_array ( 'type' , $ col -> changedProperties ) ; foreach ( $ col -> column -> toArray ( ) as $ propName => $ prop ) { if ( ( $ type_changed && $ prop && $ propName !== 'name' ) || in_array ( $ propName , $ col -> changedProperties ) ) { if ( $ propName === 'type' ) $ res .= "\n\t\t'$propName' => '" . strtolower ( $ prop ) . "'," ; else $ res .= "\n\t\t'$propName' => '$prop'," ; } } $ res .= "\n\t]);" ; return $ res ; }
Generate the code to update a column.
@param  string                           $name column name
@param  \Doctrine\DBAL\Schema\ColumnDiff $col
@return string
Generate the code to update a column .