Is it possible to move triggers into their own file in an SSDT project?

2.2k views Asked by At

I have a Visual Studio database project or SSDT of my companies database.

I have folders for Tables, Views, Stored Procedures etc and I was wondering if it is possible to have a folder for Triggers.

Currently Triggers are stored in the same file as the table definition and I would like to separate them out if possible.

2

There are 2 answers

0
Dmitrij Kultasev On

I am not sure that you can do that automatically when importing the database but you definitely can create new separate file for the trigger and put it to any folder you like.

File location - does not matter, you can put it to any folder you like.

1
Keith On

Yes, it is possible to put triggers in separate files. There is no automatic way to do this though so you will have to create these separate files manually.