Search code examples
.netfluent-migrator

Is it possible to create a trigger with FluentMigrator?


Is it possible to create a trigger with FluentMigrator, without resorting to raw SQL?

I have looked through the object model for the version currently released on Nuget (FluentMigrator.1.0.1.0) and can't see a way of doing it.


Solution

  • I'm sure you've figured out by now that the answer is no. And I don't think that triggers will be supported anytime soon. They are very database-specific and would require lots of code to cover all the different cases. See this article on Wikipedia: http://en.wikipedia.org/wiki/Database_trigger

    If you really want a Create.Trigger expression in FluentMigrator then pull requests are always welcome!