Doctrine\DBAL\Platforms\SQLServerPlatform::getCreatePrimaryKeySQL PHP Method

getCreatePrimaryKeySQL() public method

{@inheritDoc}
public getCreatePrimaryKeySQL ( Doctrine\DBAL\Schema\Index $index, $table )
$index Doctrine\DBAL\Schema\Index
    public function getCreatePrimaryKeySQL(Index $index, $table)
    {
        $flags = '';
        if ($index->hasFlag('nonclustered')) {
            $flags = ' NONCLUSTERED';
        }
        return 'ALTER TABLE ' . $table . ' ADD PRIMARY KEY' . $flags . ' (' . $this->getIndexFieldDeclarationListSQL($index->getQuotedColumns($this)) . ')';
    }
SQLServerPlatform