Skip to content

Commit

Permalink
fixing conflict resolution in 2e8498e re: pgsql
Browse files Browse the repository at this point in the history
  • Loading branch information
rchavik committed Dec 14, 2011
1 parent d77f9aa commit 6505dd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Cake/Model/Datasource/Database/Postgres.php
Expand Up @@ -308,8 +308,9 @@ public function truncate($table, $reset = false) {
}
if ($this->execute('DELETE FROM ' . $this->fullTableName($table))) {
$schema = $this->config['schema'];
if (isset($this->_sequenceMap[$fullTable]) && $reset != true) {
foreach ($this->_sequenceMap[$fullTable] as $field => $sequence) {
$table = $this->fullTableName($table, false, false);
if (isset($this->_sequenceMap[$table]) && $reset != true) {
foreach ($this->_sequenceMap[$table] as $field => $sequence) {
$this->_execute("ALTER SEQUENCE \"{$schema}\".\"{$sequence}\" RESTART WITH 1");
}
}
Expand Down

0 comments on commit 6505dd8

Please sign in to comment.