Update script generation for database trigger is wrong.

Zelimir BozicZelimir Bozic Posts: 4
edited March 5, 2015 12:10PM in SQL Compare 11
Hi,
if we change database trigger - generated update script is wrong and produce error, if object don't exists in database. (with option "Add object existence checks" turned on)

wrong update script started with:

IF NOT EXISTS (SELECT 1 FROM sys.triggers WHERE name = N'tr_db_OnDBChange' AND parent_class = 0)
EXEC sp_executesql N'
ALTER TRIGGER [tr_db_OnDBChange]

I using last 11.1.5.21

Comments

  • This looks like a bug in SQL Compare - I've raised it in our bug-tracking system as SC-7788. We'll get it fixed as soon as we can, and I'll reply to this forum post to let you know when that happens.

    Thanks for reporting the problem.
    Development Lead
    Redgate Software
  • I think this is fixed in our latest Frequent Updates release (11.1.7.47) -- we should be getting the existence check the right way round now.
Sign In or Register to comment.