Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DoctrineDbalStore.php

function DoctrineDbalStore::createTable

Creates the table to store lock keys which can be called once for setup.

Throws

DBALException When the table already exists

1 call to DoctrineDbalStore::createTable()
DoctrineDbalStore::save in vendor/symfony/lock/Store/DoctrineDbalStore.php
Stores the resource if it's not locked by someone else.

File

vendor/symfony/lock/Store/DoctrineDbalStore.php, line 190

Class

DoctrineDbalStore
DbalStore is a PersistingStoreInterface implementation using a Doctrine DBAL connection.

Namespace

Symfony\Component\Lock\Store

Code

public function createTable() : void {
    $schema = new Schema();
    $this->configureSchema($schema, static fn() => true);
    foreach ($schema->toSql($this->conn
        ->getDatabasePlatform()) as $sql) {
        $this->conn
            ->executeStatement($sql);
    }
}
RSS feed
Powered by Drupal