Skip to content

Instantly share code, notes, and snippets.

@ScullWM
Created November 29, 2018 13:00
Show Gist options
  • Save ScullWM/d26ba6a6a835712217e1f717707c42d5 to your computer and use it in GitHub Desktop.
Save ScullWM/d26ba6a6a835712217e1f717707c42d5 to your computer and use it in GitHub Desktop.
<?php
namespace App\Doctrine;
use Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
/**
* Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform.
*/
class PostgreSQL100Platform extends PostgreSQL94Platform
{
/**
* {@inheritdoc}
*/
protected function getReservedKeywordsClass() : string
{
return PostgreSQL94Keywords::class;
}
public function getListSequencesSQL($database) : string
{
return 'SELECT sequence_name AS relname,
sequence_schema AS schemaname,
minimum_value AS min_value,
increment AS increment_by
FROM information_schema.sequences
WHERE sequence_catalog = ' . $this->quoteStringLiteral($database) . "
AND sequence_schema NOT LIKE 'pg\_%'
AND sequence_schema != 'information_schema'";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment