blob: 7b1a6f40be474fcd97df3661c4ea473399685821 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- 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']);
}
|