I am a C# developer, and would rather use VS 15 and SSDT than SSMS.
However, I don't understand how I should be doing an "Alter Trigger..." script.
For example, In Sql Object Explorer, I select Design, and the Designer opens. I then click on the trigger on the right hand side, and it displays a create script for the trigger.
However, I don't want to create it, I want to alter the existing one. So I change "create" to "alter", thinking that should run. However, an error is thrown:
This statement is not recognized in this context.
Should I be using SSMS for this type of activity?
The only workaround I could come up with is changing the name of the existing trigger, and then running the create statement instead of an alter statement.
I am just wondering what the workflow is supposed to be on this.
When you deploy an SSDT project it takes the model in the SSDT project, compares it to the database and then automatically generates the upgrade script.
So what you do is write "create trigger" and publish your database and the upgrade will either drop and create the new one or do an alter for you.
If you haven't deployed to your database yet I would suggest generating a script rather than publishing it and verifying what is in there first. :)