StrataFrame Forum

Foreign Key Cascading Behavior

http://forum.strataframe.net/Topic4911.aspx

By Chris Crabtree - 12/4/2006

To repro:

Define a FK relationship.

Deploy the database.

Change the cascade behavior of the FK relationship.

Deploy the database. SQL Server complains that you can't Alter--you must drop and recreate with the desired cascade behavior.

Workaround:

Delete the FK relationship in DDT.

Deploy the database.

Create the FK relationship again with the desired cascade behavior.

Deploy the database.

Permanent solution:

DDT should understand that a change in cascade behavior requires the FK to be dropped and recreated and just do that.

Thanks!

By StrataFrame Team - 12/4/2006

Aha... thanks for the report... I'll change the DatabaseMigrator to do just that when altering foreign keys.  Thanks.