I'm using EF Migrations with a Firebirdsql
Database and it works fine just fine while I update databases using the PackageManagerConsole
in VS.
If I use
Update-Database -Script
and then try to run the script I get an error.
After a bit of testing I think that it breaks with this sentences
EXECUTE BLOCK
AS
BEGIN
if (not exists(select 1 from rdb$generators where rdb$generator_name = 'GEN_IDENTITY')) then
begin
execute statement 'create sequence GEN_IDENTITY';
end
END
;
CREATE OR ALTER TRIGGER "ID_Users_Id" ACTIVE BEFORE INSERT ON "Users"
AS
BEGIN
if (new."Id" is null) then
begin
new."Id" = next value for GEN_IDENTITY;
end
END
;
If I try to run it returns
ISC ERROR MESSAGE: Dynamic SQL Error SQL error code = -104 Unexpected
end of command - line 6, column 21