Page 1 of 1

Code-First Migrations: AlterColumn throws exception when changing identity to true

Posted: Thu 04 Dec 2014 09:26
by dresel
Hi,

when changing an entity key from DatabaseGeneratedOption.None to DatabaseGeneratedOption.Identity the following migration code block will throw an exception:

Code: Select all

DropPrimaryKey("dbo.TestTables");
AlterColumn("dbo.TestTables", "TestTableID", c => c.Int(nullable: false, identity: true));
AddPrimaryKey("dbo.TestTables", "TestTableID");
The exception says "serial does not exist". I also sent you an sample project to reproduce this issue.

Re: Code-First Migrations: AlterColumn throws exception when changing identity to true

Posted: Thu 04 Dec 2014 12:12
by MariiaI
Thank you for the report. We have reproduced this issue. We will investigate it and inform you about the results as soon as possible.

Re: Code-First Migrations: AlterColumn throws exception when changing identity to true

Posted: Fri 19 Dec 2014 05:49
by MariiaI
The bug related to the "Type 'serial' doesn't exist" error while performing the ALTER TABLE statement via Code-First migrations is fixed.
New build of dotConnect for PostgreSQL 7.3.313 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=3&t=30982.