mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-14 12:21:47 +01:00
21 lines
1.2 KiB
Diff
21 lines
1.2 KiB
Diff
--- a/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php.orig 2017-11-05 15:37:27.538064270 +0100
|
|
+++ b/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php 2017-11-05 15:38:54.014644323 +0100
|
|
@@ -289,7 +289,16 @@
|
|
$sequenceName = $sequence['relname'];
|
|
}
|
|
|
|
- $data = $this->_conn->fetchAll('SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName));
|
|
+ $version = floatval($this->_conn->getWrappedConnection()->getServerVersion());
|
|
+
|
|
+ if ($version >= 10) {
|
|
+ $data = $this->_conn->fetchAll('SELECT min_value, increment_by FROM pg_sequences WHERE schemaname = \'public\' AND sequencename = '.$this->_conn->quote($sequenceName));
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ $data = $this->_conn->fetchAll('SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName));
|
|
+ }
|
|
+// $data = $this->_conn->fetchAll('SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName));
|
|
|
|
return new Sequence($sequenceName, $data[0]['increment_by'], $data[0]['min_value']);
|
|
}
|