Red Gate forums :: View topic - Controlling script folder evaluation order
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare Previous Versions
SQL Compare Previous Versions forum

Controlling script folder evaluation order

Search in SQL Compare Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
chilversc



Joined: 30 Nov 2011
Posts: 1

PostPosted: Wed Nov 30, 2011 4:19 pm    Post subject: Controlling script folder evaluation order Reply with quote

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.
Back to top
View user's profile Send private message
jgonzalez



Joined: 31 Oct 2011
Posts: 5

PostPosted: Thu Dec 01, 2011 4:47 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group