private function DatabaseSchema_sqlsrv::createTechnicalPrimaryKeyIndexSql in Drupal driver for SQL Server and SQL Azure 7.3
Same name and namespace in other branches
- 7.2 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::createTechnicalPrimaryKeyIndexSql()
Create the SQL needed to add a new technical primary key based on a computed column.
File
- sqlsrv/
schema.inc, line 636 - Database schema code for Microsoft SQL Server database servers.
Class
Code
private function createTechnicalPrimaryKeyIndexSql($table) {
$result = array();
$result[] = "{$this->TECHNICAL_PK_COLUMN_NAME} UNIQUEIDENTIFIER DEFAULT NEWID() NOT NULL";
$result[] = "CONSTRAINT {{$table}}_pkey_technical PRIMARY KEY CLUSTERED ({$this->TECHNICAL_PK_COLUMN_NAME})";
return implode(' ', $result);
}