How can we help you today? How can we help you today?

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

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
0

Comments

5 comments

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

Add comment

Please sign in to leave a comment.