public function Schema::dropConstraint in Drupal driver for SQL Server and SQL Azure 3.0.x
Drop a constraint.
Parameters
string $table: Table name.
string $name: Constraint name.
bool $check: Check if the constraint exists?
3 calls to Schema::dropConstraint()
- Schema::cleanUpPrimaryKey in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Schema.php - Drop the primary key constraint.
- Schema::dropFieldRelatedObjects in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Schema.php - Drop the related objects of a column (indexes, constraints, etc.).
- Schema::fieldSetNoDefault in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Schema.php
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Schema.php, line 1806
Class
Namespace
Drupal\Driver\Database\sqlsrvCode
public function dropConstraint($table, $name, $check = TRUE) {
// Check if constraint exists.
if ($check) {
// Do Something.
}
$sql = 'ALTER TABLE {' . $table . '} DROP CONSTRAINT [' . $name . ']';
$this->connection
->query($sql);
$this
->resetColumnInformation($table);
}