You are here

public function S3fsService::setTables in S3 File System 8.3

Same name and namespace in other branches
  1. 4.0.x src/S3fsService.php \Drupal\s3fs\S3fsService::setTables()

Set up the final tables from the temp tables.

Overrides S3fsServiceInterface::setTables

1 call to S3fsService::setTables()
S3fsService::refreshCache in src/S3fsService.php
Refreshes the metadata cache.

File

src/S3fsService.php, line 580

Class

S3fsService
Defines a S3fsService service.

Namespace

Drupal\s3fs

Code

public function setTables() {

  // Swap the temp table with the real table.
  \Drupal::database()
    ->schema()
    ->renameTable('s3fs_file', 's3fs_file_old');
  \Drupal::database()
    ->schema()
    ->renameTable('s3fs_file_temp', 's3fs_file');
  \Drupal::database()
    ->schema()
    ->dropTable('s3fs_file_old');
}