DoctrineMigrations\Version20160823140932::up PHP Method

up() public method

public up ( Doctrine\DBAL\Schema\Schema $schema )
$schema Doctrine\DBAL\Schema\Schema
    public function up(Schema $schema)
    {
        if ($this->platform->getName() == 'postgresql') {
            $qb = $this->connection->createQueryBuilder();
            $max = $qb->select('max(id) + 1')->from('dtb_help')->execute()->fetchColumn();
            $this->addSql("SELECT setval('dtb_help_id_seq', {$max});");
        }
    }
Version20160823140932