mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 20:42:42 +00:00
Fixed problems with resetSequence() not using the correct sequence name
in postgres
This commit is contained in:
parent
d4631a6ead
commit
c00d58b4ef
1 changed files with 4 additions and 1 deletions
|
@ -287,7 +287,10 @@ class Postgres extends DboSource {
|
|||
if (is_object($table)) {
|
||||
$table = $this->fullTableName($table, false, false);
|
||||
}
|
||||
if (isset($this->_sequenceMap[$table]) && isset($this->_sequenceMap[$table][$field])) {
|
||||
if (!isset($this->_sequenceMap[$table])) {
|
||||
$this->describe($table);
|
||||
}
|
||||
if (isset($this->_sequenceMap[$table][$field])) {
|
||||
return $this->_sequenceMap[$table][$field];
|
||||
} else {
|
||||
return "{$table}_{$field}_seq";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue