Forum for users of SQL Compare schema synchronization utility
Moderators: JonathanWatts, Chris Auckland, David Atkinson
How do I control the order the scripts are evaluated?
I like to store my foreign keys separately to the tables, so I'll have 2 folders, "Tables" and "Foreign Keys".
However, when I try to compare a database against the script folder it complains about table "Foo" not existing for each of the foreign key's "ALTER TABLE Foo" statements.
I've determined that it is an ordering problem since if I rename the directories "01_Tables", "02_Foreign Keys" the script parses correctly.
I don't like having to rename the directories like this though since I can't see anywhere in the documentation that this behaviour is guaranteed thus it seems to me like I would be relying upon undefined behaviour.
- Posts: 1
- Joined: Wed Nov 30, 2011 3:58 pm
Is there a reason you have to have them separate? SQL Compare always generates the foreign key statements after the table in every script I have ever seen.
We script out our entire database into an "Objects" directory and let SQL Compare organize the sub directories beneath it however it wants.
- Posts: 5
- Joined: Mon Oct 31, 2011 6:02 pm
Return to SQL Compare Previous Versions
Who is online
Users browsing this forum: No registered users and 0 guests