fixing conflict resolution in 2e8498e1 re: pgsql

This commit is contained in:
Rachman Chavik 2011-12-14 07:41:57 +07:00
parent d77f9aacde
commit 6505dd8e29

View file

@ -308,8 +308,9 @@ class Postgres extends DboSource {
} }
if ($this->execute('DELETE FROM ' . $this->fullTableName($table))) { if ($this->execute('DELETE FROM ' . $this->fullTableName($table))) {
$schema = $this->config['schema']; $schema = $this->config['schema'];
if (isset($this->_sequenceMap[$fullTable]) && $reset != true) { $table = $this->fullTableName($table, false, false);
foreach ($this->_sequenceMap[$fullTable] as $field => $sequence) { if (isset($this->_sequenceMap[$table]) && $reset != true) {
foreach ($this->_sequenceMap[$table] as $field => $sequence) {
$this->_execute("ALTER SEQUENCE \"{$schema}\".\"{$sequence}\" RESTART WITH 1"); $this->_execute("ALTER SEQUENCE \"{$schema}\".\"{$sequence}\" RESTART WITH 1");
} }
} }