page_manager_migration-1.0.x-dev/tests/fixtures/pm-panels-export/field_config.php
tests/fixtures/pm-panels-export/field_config.php
<?php
// phpcs:ignoreFile
/**
* @file
* A database agnostic dump for testing purposes.
*
* This file was generated by the Drupal 9.3.4 db-tools.php script.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Ensure any tables with a serial column with a value of 0 are created as
// expected.
if ($connection->databaseType() === 'mysql') {
$sql_mode = $connection->query("SELECT @@sql_mode;")->fetchField();
$connection->query("SET sql_mode = '$sql_mode,NO_AUTO_VALUE_ON_ZERO'");
}
$connection->schema()->createTable('field_config', array(
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'size' => 'normal',
),
'field_name' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
),
'type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
),
'module' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'active' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'storage_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
),
'storage_module' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'storage_active' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'locked' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'data' => array(
'type' => 'blob',
'not null' => TRUE,
'size' => 'big',
),
'cardinality' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'translatable' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
),
'primary key' => array(
'id',
),
'indexes' => array(
'field_name' => array(
'field_name',
),
'active' => array(
'active',
),
'storage_active' => array(
'storage_active',
),
'deleted' => array(
'deleted',
),
'module' => array(
'module',
),
'storage_module' => array(
'storage_module',
),
'type' => array(
'type',
),
'storage_type' => array(
'storage_type',
),
),
'mysql_character_set' => 'utf8',
));
$connection->insert('field_config')
->fields(array(
'id',
'field_name',
'type',
'module',
'active',
'storage_type',
'storage_module',
'storage_active',
'locked',
'data',
'cardinality',
'translatable',
'deleted',
))
->values(array(
'id' => '1',
'field_name' => 'body',
'type' => 'text_with_summary',
'module' => 'text',
'active' => '1',
'storage_type' => 'field_sql_storage',
'storage_module' => 'field_sql_storage',
'storage_active' => '1',
'locked' => '0',
'data' => 'a:6:{s:12:"entity_types";a:1:{i:0;s:4:"node";}s:12:"translatable";b:0;s:8:"settings";a:0:{}s:7:"storage";a:4:{s:4:"type";s:17:"field_sql_storage";s:8:"settings";a:0:{}s:6:"module";s:17:"field_sql_storage";s:6:"active";i:1;}s:12:"foreign keys";a:1:{s:6:"format";a:2:{s:5:"table";s:13:"filter_format";s:7:"columns";a:1:{s:6:"format";s:6:"format";}}}s:7:"indexes";a:1:{s:6:"format";a:1:{i:0;s:6:"format";}}}',
'cardinality' => '1',
'translatable' => '0',
'deleted' => '0',
))
->execute();
// Reset the SQL mode.
if ($connection->databaseType() === 'mysql') {
$connection->query("SET sql_mode = '$sql_mode'");
}