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

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace, andy.campbell.smith

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

Postby sgilboy » Tue Jun 25, 2013 1:42 pm

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?
sgilboy
 
Posts: 30
Joined: Wed Jun 22, 2011 7:38 pm

Postby james.billings » Thu Jun 27, 2013 3:21 pm

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.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Re:

Postby sgilboy » Thu Jun 27, 2013 3:30 pm

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)
sgilboy
 
Posts: 30
Joined: Wed Jun 22, 2011 7:38 pm

Postby james.billings » Thu Jun 27, 2013 3:32 pm

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.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby sgilboy » Thu Jun 27, 2013 3:33 pm

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...
sgilboy
 
Posts: 30
Joined: Wed Jun 22, 2011 7:38 pm

Postby james.billings » Thu Jun 27, 2013 3:37 pm

Sure - do post back if you're seeing anything weird with identical objects being flagged as different though!
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Source Control 3

Who is online

Users browsing this forum: No registered users and 0 guests