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

Breadcrumb

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

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\Store

Code

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,
    ]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal