diff --git a/pydal/adapters/firebird.py b/pydal/adapters/firebird.py index cee01923d..806e45387 100644 --- a/pydal/adapters/firebird.py +++ b/pydal/adapters/firebird.py @@ -1,8 +1,9 @@ import re -from .._compat import integer_types, long +from .._compat import long from .base import SQLAdapter from . import adapters + @adapters.register_for('firebird') class FireBird(SQLAdapter): dbengine = "firebird" @@ -59,8 +60,8 @@ def create_sequence_and_triggers(self, query, table, **args): self.execute('set generator %s to 0;' % sequence_name) self.execute( 'create trigger %s for %s active before insert position 0 ' + - 'as\nbegin\nif(new.id is null) then\nbegin\n' + - 'new.id = gen_id(%s, 1);\nend\nend;' % ( + 'as\nbegin\nif(new."id" is null) then\nbegin\n' + + 'new."id" = gen_id(%s, 1);\nend\nend;' % ( trigger_name, tablename, sequence_name))