Commit 3f99bc1e authored by Tomáš Trávníček's avatar Tomáš Trávníček

fix postgresql 12 create schema

parent de23082f
Pipeline #10370 failed with stages
in 1 minute and 32 seconds
......@@ -289,7 +289,14 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
$sequenceName = $sequence['relname'];
}
$version = (float)$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));
}
return new Sequence($sequenceName, $data[0]['increment_by'], $data[0]['min_value']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment