db\pgsql\QueryBuilder alterColumn()

alterColumn() public method

Builds a SQL statement for changing the definition of a column.

public string alterColumn ( $table, $column, $type )
$table string

The table whose column is to be changed. The table name will be properly quoted by the method.

$column string

The name of the column to be changed. The name will be properly quoted by the method.

$type string

The new column type. The getColumnType() method will be invoked to convert abstract column type (if any) into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL. For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'. You can also use PostgreSQL-specific syntax such as SET NOT NULL.

return string

The SQL statement for changing the definition of a column.

doc_Yii
2016-10-30 16:58:44
Comments
Leave a Comment

Please login to continue.