Dev SSO: Tables, SAML
This commit is contained in:
@@ -507,6 +507,18 @@ class MySQL extends SQL {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function startTransaction(): bool {
|
||||
return $this->connection->begin_transaction();
|
||||
}
|
||||
|
||||
public function commit(): bool {
|
||||
return $this->connection->commit();
|
||||
}
|
||||
|
||||
public function rollback(): bool {
|
||||
return $this->connection->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
class RowIteratorMySQL extends RowIterator {
|
||||
|
||||
@@ -116,8 +116,17 @@ class AlterTable extends Query {
|
||||
}
|
||||
}
|
||||
} else if ($action === "ADD") {
|
||||
$query .= "CONSTRAINT ";
|
||||
$query .= $this->sql->getConstraintDefinition($constraint);
|
||||
$constraintName = $constraint->getName();
|
||||
|
||||
if ($constraintName) {
|
||||
$query .= "CONSTRAINT ";
|
||||
$query .= $constraintName;
|
||||
$query .= " ";
|
||||
$query .= $this->sql->getConstraintDefinition($constraint);
|
||||
} else {
|
||||
$this->sql->setLastError("Cannot ADD CONSTRAINT without a constraint name.");
|
||||
return null;
|
||||
}
|
||||
} else if ($action === "MODIFY") {
|
||||
$this->sql->setLastError("MODIFY CONSTRAINT foreign key is not supported.");
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user