Red Gate forums :: View topic - initialize new fields (default value)
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

initialize new fields (default value)

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



Joined: 23 Jul 2007
Posts: 1

PostPosted: Mon Jul 23, 2007 9:26 am    Post subject: initialize new fields (default value) Reply with quote

hello,

i am new in sql compare 6. i have tried it.
Now I have the following question:
Is it possible to (automatically) initialize/set default values to new fields in the updated database.
For example: for numeric fields set default value to zero (0).
Another "problem" is:
One table gets a new (additional) key field. How can I initialize this field, too?

thanks in advance!

regards, tha
Back to top
View user's profile Send private message
Michelle Taylor



Joined: 30 Oct 2006
Posts: 525
Location: Red Gate Software

PostPosted: Tue Jul 24, 2007 11:55 am    Post subject: Reply with quote

I'm afraid there isn't currently a way to automatically initialize newly added fields with default values. It's a feature we've been considering adding in future releases, and I'll add this thread to the feature request.

Currently the obvious workaround is to add a default constraint to the field in the source database, but we understand that isn't the best solution if you don't want the field to have a default after the synchronization is complete.

You can also save the synchronization script / ask Compare to load it in Query Analyzer or Management Studio and then edit the script by hand to have a default constraint added and then dropped from the column.
Back to top
View user's profile Send private message
David Atkinson



Joined: 05 Dec 2005
Posts: 1114
Location: Twitter: @dtabase

PostPosted: Tue Oct 18, 2011 12:00 am    Post subject: Reply with quote

SQL Compare 9.5 with SQL Source Control 3 allows custom scripts that override default behavior. This should allow you to make any modifications you like, such as setting a default value.

http://www.red-gate.com/MessageBoard/viewtopic.php?p=51312#51312

Kind regards,

David Atkinson
Product Manager
Red Gate Software
Back to top
View user's profile Send private message Send e-mail
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