Problem when updatin primary keys



My problem is that, I have changes in primary keys, so DBDiff generated drop and create commands for them, but there are foreign keys pointing to those primary keys, so the script doesn't work properly because SQL Server doesn't allow the drop with the existing dependencies.
I believe that should be created commands to drop the foreign keys before the drop of primary keys, than recreate foreign keys after recreation of primary keys.
Are there any work arround, any configuration that I missed?



jspraul wrote Sep 12, 2016 at 9:07 PM

It sounds like you've found a bug in the dependency management; thanks for taking the time to report this issue.

Props to you for having a database with foreign keys, so many don't! If you are willing to script out the minimal necessary to reproduce this issue it will help in testing the fix. (Don't use your db schema, just something generic that reproduces the problem.) Also without a repro it's easy to come up with something similar to your situation that 'works for me' since it isn't exactly the same (though your description seems sufficient).

Thanks again for taking the time to report this issue.