Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2
-
Fix Version/s: None
-
Component/s: Attributes, Migrations
-
Labels:None
-
Environment:PostgreSQL 8.4
Description
If you have an existing column Postgresql won't allow you to use the type SERIAL for altering the column.
First create a column cat_id on category of integer type. Then run the following migration:
migration.php
public function up() { $this->changeColumn('category', 'cat_id', 'integer', '4', array( 'unsigned' => '', 'primary' => '1', 'autoincrement' => '1', )); }
Instead of using type SERIAL doctrine would have to simply alter the column then add a sequence on it's own.