Red Gate forums :: View topic - Workaround to include tbl triggers w/o including the tbl?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 3
SQL Source Control 3 forum

Workaround to include tbl triggers w/o including the tbl?

Search in SQL Source Control 3 forum
Post new topic   Reply to topic
Jump to:  
Author Message
sgilboy



Joined: 22 Jun 2011
Posts: 30

PostPosted: Tue Jun 25, 2013 1:42 pm    Post subject: Workaround to include tbl triggers w/o including the tbl? Reply with quote

Is there any sort of way using filters or SQL Source Control configuration that I can include triggers I have created for tables without having to include the tables themselves in the Source Control mix?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1123
Location: My desk.

PostPosted: Thu Jun 27, 2013 3:21 pm    Post subject: Reply with quote

Hi,
Unfortunately, triggers are scripted alongside the table they relate to, so this isn't really possible.
What's the reasoning behind not wanting the table script? There may be a problem here that can be solved another way.

Our tools are designed to work with a set of scripts that, all together, represent a valid database. If you omitted various objects then it could lead to unpredictable behaviour/errors.
Back to top
View user's profile Send private message
sgilboy



Joined: 22 Jun 2011
Posts: 30

PostPosted: Thu Jun 27, 2013 3:30 pm    Post subject: Re: Reply with quote

james.billings wrote:
Hi,
Unfortunately, triggers are scripted alongside the table they relate to, so this isn't really possible.
What's the reasoning behind not wanting the table script? There may be a problem here that can be solved another way.

Our tools are designed to work with a set of scripts that, all together, represent a valid database. If you omitted various objects then it could lead to unpredictable behaviour/errors.


mainly because SQL Source control *constantly* seems to want to check tables in for changes, even when it appears nothing was done.....

this was the case long ago when we first started using it though (back in 2010 i think)
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1123
Location: My desk.

PostPosted: Thu Jun 27, 2013 3:32 pm    Post subject: Reply with quote

It shouldn't want to check in objects that don't have any differences. There were the odd bugs that did make it behave like this though, are you on the latest version?

If you're seeing a table show on the commit tab but there's no difference at all, then it would be useful to get a copy of both the definition from SSMS and also the related file from your repository so we can work out why it's being picked up.
Back to top
View user's profile Send private message
sgilboy



Joined: 22 Jun 2011
Posts: 30

PostPosted: Thu Jun 27, 2013 3:33 pm    Post subject: Reply with quote

Yeah, the prob with tables was many many versions ago

we are on 3.4.4.36 now... maybe I should give it another go-around...
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1123
Location: My desk.

PostPosted: Thu Jun 27, 2013 3:37 pm    Post subject: Reply with quote

Sure - do post back if you're seeing anything weird with identical objects being flagged as different though!
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