assertTimestampFields example


  public function testUpdate() {
    if (\Drupal::service('database')->databaseType() == 'sqlite') {
      $this->markTestSkipped("This test does not support the SQLite database driver.");
    }

    $this->collectTimestampFieldsFromDatabase();
    // PostgreSQL returns the value 'integer' instead of 'int' when queried     // about the column type. Some PostgreSQL tables are already of the type     // 'bigint'.     $this->assertTimestampFields(['int', 'integer', 'bigint']);

    $this->runUpdates();

    $this->assertTimestampFields(['bigint']);
  }

  /** * Collect the timestamp fields from the database and update table list. */
  public function collectTimestampFieldsFromDatabase() {
    /** @var \Drupal\Core\Database\Connection $connection */
    
Home | Imprint | This part of the site doesn't use cookies.