function DoctrineDbalStore::configureSchema
Adds the Table to the Schema if it doesn't exist.
1 call to DoctrineDbalStore::configureSchema()
- DoctrineDbalStore::createTable in vendor/
symfony/ lock/ Store/ DoctrineDbalStore.php - Creates the table to store lock keys which can be called once for setup.
File
-
vendor/
symfony/ lock/ Store/ DoctrineDbalStore.php, line 203
Class
- DoctrineDbalStore
- DbalStore is a PersistingStoreInterface implementation using a Doctrine DBAL connection.
Namespace
Symfony\Component\Lock\StoreCode
public function configureSchema(Schema $schema, \Closure $isSameDatabase) : void {
if ($schema->hasTable($this->table)) {
return;
}
if (!$isSameDatabase($this->conn
->executeStatement(...))) {
return;
}
$table = $schema->createTable($this->table);
$table->addColumn($this->idCol, 'string', [
'length' => 64,
]);
$table->addColumn($this->tokenCol, 'string', [
'length' => 44,
]);
$table->addColumn($this->expirationCol, 'integer', [
'unsigned' => true,
]);
$table->setPrimaryKey([
$this->idCol,
]);
}