Is there a way to create a trigger using fluentmigrator / firebirdsql?
When I try this
Execute.Sql(@"CREATE TRIGGER TEST_BI FOR 'Test'
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
IF (NEW.ID IS NULL) THEN
NEW.ID = GEN_ID(GEN_TEST_ID,1)
END
");
nothing happens. I tried the firebird syntax using SET TERM ^; but I get an error then. I also tried calling the DDL statement from a script, with Execute.Script() but still nothing.
Any suggestions? Thanks!
SET TERMis not part of the Firebird syntax, it is a part of tools like ISQL. Also statements in a PSQL block need to end with a semi-colon (only inside the PSQL block!). - Mark RotteveelFluentMigrator.TransactionBehavior.Defaultwhen defining migration. - H Mihail