1
0
mirror of synced 2025-02-20 06:03:15 +03:00
This commit is contained in:
zYne 2007-10-29 22:57:32 +00:00
parent 755316c3fc
commit 486375f844

View File

@ -88,13 +88,12 @@ class Doctrine_Export_Firebird extends Doctrine_Export
$table = $this->conn->quoteIdentifier($table, true);
$name = $this->conn->quoteIdentifier($name, true);
$triggerSql = 'CREATE TRIGGER ' . $trigger_name . ' FOR ' . $table . '
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
IF (NEW.' . $name . ' IS NULL OR NEW.' . $name . ' = 0) THEN
NEW.' . $name . ' = GEN_ID('.$sequence_name.', 1);
END';
$triggerSql = 'CREATE TRIGGER ' . $trigger_name . ' FOR ' . $table
. ' ACTIVE BEFORE INSERT POSITION 0 AS'
. ' BEGIN'
. ' IF (NEW.' . $name . ' IS NULL OR NEW.' . $name . ' = 0) THEN'
. ' NEW.' . $name . ' = GEN_ID('.$sequence_name.', 1)'
. ' END';
$result = $this->conn->exec($triggerSql);
// TODO ? $this->_silentCommit();
@ -549,4 +548,4 @@ class Doctrine_Export_Firebird extends Doctrine_Export
return $query;
}
}
}