Foreign Key Cascading Behavior


Author
Message
Chris Crabtree
Chris Crabtree
StrataFrame Novice (57 reputation)StrataFrame Novice (57 reputation)StrataFrame Novice (57 reputation)StrataFrame Novice (57 reputation)StrataFrame Novice (57 reputation)StrataFrame Novice (57 reputation)StrataFrame Novice (57 reputation)StrataFrame Novice (57 reputation)StrataFrame Novice (57 reputation)
Group: Forum Members
Posts: 57, Visits: 107
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!

StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Aha... thanks for the report... I'll change the DatabaseMigrator to do just that when altering foreign keys.  Thanks.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search