Issue 145 in migratordotnet: Error removing columns with unique constraints

5 views
Skip to first unread message

codesite...@google.com

unread,
Mar 17, 2010, 2:26:26 PM3/17/10
to migratordo...@googlegroups.com
Status: New
Owner: ----

New issue 145 by faede999: Error removing columns with unique constraints
http://code.google.com/p/migratordotnet/issues/detail?id=145

What steps will reproduce the problem?
1. Apply the upgrade migration below.
2. Downgrade the migration.

[Migration(2)]
public class Test_001 : Migration
{
public override void Up()
{
Database.AddTable("TestTable", new Column("TestCol",
DbType.Int32));
Database.AddColumn("TestTable", new Column("TestCol1",
DbType.Int32, ColumnProperty.Unique));
}

public override void Down()
{
Database.RemoveColumn("TestTable", "TestCol1");
Database.RemoveTable("TestTable");
}
}

What is the expected output? What do you see instead?

It should remove the column and table, but instead throws an exception on
the downgrade:
System.Data.SqlClient.SqlException: The object
UQ__TestTabl__0B0C76C503317E3D' is dependent on column 'TestCol1'.

What version of the product are you using? On what operating system? With
what .NET implementation/version?

Migrator version: 0.9
OS: Windows 7
.NET: 3.5

What database and version are you seeing this issue on?

DB: Sql Server 2008 Express

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply all
Reply to author
Forward
0 new messages