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.
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.
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!
You can use Execute.Script
[Migration(1)]
public class Migration_0001_Baseline : Migration
{
public override void Up()
{
Execute.Script("script1.sql");
}
public override void Down()
{
}
}
Down
script too for Rollback / MigrateDown. –
Pteropod 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!
© 2022 - 2024 — McMap. All rights reserved.