Options

Controlling script folder evaluation order

chilverscchilversc Posts: 2
edited November 30, 2011 10:47PM in SQL Compare Previous Versions
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.

Comments

  • Options
    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.
Sign In or Register to comment.