drupal7.php in Range 8
A database agnostic dump for testing purposes.
This file was generated by the Drupal db-tools.php script and then modified:
- only necessary tables & records were preserved
File
tests/fixtures/drupal7.phpView source
<?php
// @codingStandardsIgnoreFile
/**
* @file
* A database agnostic dump for testing purposes.
*
* This file was generated by the Drupal db-tools.php script and then modified:
* - only necessary tables & records were preserved
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$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' => '2',
'field_name' => 'field_decimal',
'type' => 'range_decimal',
'module' => 'range',
'active' => '1',
'storage_type' => 'field_sql_storage',
'storage_module' => 'field_sql_storage',
'storage_active' => '1',
'locked' => '0',
'data' => 'a:7:{s:12:"translatable";s:1:"0";s:12:"entity_types";a:0:{}s:8:"settings";a:3:{s:9:"precision";s:2:"12";s:5:"scale";s:1:"4";s:17:"decimal_separator";s:1:",";}s:7:"storage";a:5:{s:4:"type";s:17:"field_sql_storage";s:8:"settings";a:0:{}s:6:"module";s:17:"field_sql_storage";s:6:"active";s:1:"1";s:7:"details";a:1:{s:3:"sql";a:2:{s:18:"FIELD_LOAD_CURRENT";a:1:{s:24:"field_data_field_decimal";a:2:{s:4:"from";s:18:"field_decimal_from";s:2:"to";s:16:"field_decimal_to";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:28:"field_revision_field_decimal";a:2:{s:4:"from";s:18:"field_decimal_from";s:2:"to";s:16:"field_decimal_to";}}}}}s:12:"foreign keys";a:0:{}s:7:"indexes";a:0:{}s:2:"id";s:1:"2";}',
'cardinality' => '-1',
'translatable' => '0',
'deleted' => '0',
))
->values(array(
'id' => '3',
'field_name' => 'field_float',
'type' => 'range_float',
'module' => 'range',
'active' => '1',
'storage_type' => 'field_sql_storage',
'storage_module' => 'field_sql_storage',
'storage_active' => '1',
'locked' => '0',
'data' => 'a:7:{s:12:"translatable";s:1:"0";s:12:"entity_types";a:0:{}s:8:"settings";a:1:{s:17:"decimal_separator";s:1:".";}s:7:"storage";a:5:{s:4:"type";s:17:"field_sql_storage";s:8:"settings";a:0:{}s:6:"module";s:17:"field_sql_storage";s:6:"active";s:1:"1";s:7:"details";a:1:{s:3:"sql";a:2:{s:18:"FIELD_LOAD_CURRENT";a:1:{s:22:"field_data_field_float";a:2:{s:4:"from";s:16:"field_float_from";s:2:"to";s:14:"field_float_to";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:26:"field_revision_field_float";a:2:{s:4:"from";s:16:"field_float_from";s:2:"to";s:14:"field_float_to";}}}}}s:12:"foreign keys";a:0:{}s:7:"indexes";a:0:{}s:2:"id";s:1:"3";}',
'cardinality' => '1',
'translatable' => '0',
'deleted' => '0',
))
->values(array(
'id' => '4',
'field_name' => 'field_integer',
'type' => 'range_integer',
'module' => 'range',
'active' => '1',
'storage_type' => 'field_sql_storage',
'storage_module' => 'field_sql_storage',
'storage_active' => '1',
'locked' => '0',
'data' => 'a:7:{s:12:"translatable";s:1:"0";s:12:"entity_types";a:0:{}s:8:"settings";a:0:{}s:7:"storage";a:5:{s:4:"type";s:17:"field_sql_storage";s:8:"settings";a:0:{}s:6:"module";s:17:"field_sql_storage";s:6:"active";s:1:"1";s:7:"details";a:1:{s:3:"sql";a:2:{s:18:"FIELD_LOAD_CURRENT";a:1:{s:24:"field_data_field_integer";a:2:{s:4:"from";s:18:"field_integer_from";s:2:"to";s:16:"field_integer_to";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:28:"field_revision_field_integer";a:2:{s:4:"from";s:18:"field_integer_from";s:2:"to";s:16:"field_integer_to";}}}}}s:12:"foreign keys";a:0:{}s:7:"indexes";a:0:{}s:2:"id";s:1:"4";}',
'cardinality' => '1',
'translatable' => '0',
'deleted' => '0',
))
->execute();
$connection
->schema()
->createTable('field_config_instance', array(
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'size' => 'normal',
),
'field_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
),
'field_name' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'entity_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'bundle' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'data' => array(
'type' => 'blob',
'not null' => TRUE,
'size' => 'big',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
),
'primary key' => array(
'id',
),
'indexes' => array(
'field_name_bundle' => array(
'field_name',
'entity_type',
'bundle',
),
'deleted' => array(
'deleted',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('field_config_instance')
->fields(array(
'id',
'field_id',
'field_name',
'entity_type',
'bundle',
'data',
'deleted',
))
->values(array(
'id' => '2',
'field_id' => '2',
'field_name' => 'field_decimal',
'entity_type' => 'node',
'bundle' => 'page',
'data' => 'a:7:{s:5:"label";s:7:"Decimal";s:6:"widget";a:5:{s:6:"weight";s:2:"-4";s:4:"type";s:5:"range";s:6:"module";s:5:"range";s:6:"active";i:0;s:8:"settings";a:0:{}}s:8:"settings";a:7:{s:3:"min";s:0:"";s:3:"max";s:0:"";s:4:"from";a:3:{s:5:"label";s:4:"From";s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";}s:2:"to";a:3:{s:5:"label";s:2:"to";s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";}s:5:"field";a:2:{s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";}s:8:"combined";a:2:{s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";}s:18:"user_register_form";b:0;}s:7:"display";a:2:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:13:"range_decimal";s:6:"weight";s:1:"0";s:8:"settings";a:9:{s:18:"thousand_separator";s:1:".";s:17:"decimal_separator";s:2:", ";s:5:"scale";s:1:"3";s:15:"range_separator";s:3:" - ";s:13:"range_combine";i:1;s:18:"from_prefix_suffix";i:1;s:16:"to_prefix_suffix";i:1;s:19:"field_prefix_suffix";i:1;s:22:"combined_prefix_suffix";i:1;}s:6:"module";s:5:"range";}s:6:"teaser";a:5:{s:5:"label";s:5:"above";s:4:"type";s:21:"range_decimal_sprintf";s:6:"weight";s:1:"0";s:8:"settings";a:7:{s:13:"format_string";s:4:"%.0f";s:15:"range_separator";s:2:"--";s:13:"range_combine";i:0;s:18:"from_prefix_suffix";i:0;s:16:"to_prefix_suffix";i:0;s:19:"field_prefix_suffix";i:0;s:22:"combined_prefix_suffix";i:0;}s:6:"module";s:5:"range";}}s:8:"required";i:1;s:11:"description";s:0:"";s:13:"default_value";N;}',
'deleted' => '0',
))
->values(array(
'id' => '3',
'field_id' => '3',
'field_name' => 'field_float',
'entity_type' => 'node',
'bundle' => 'page',
'data' => 'a:7:{s:5:"label";s:5:"Float";s:6:"widget";a:5:{s:6:"weight";s:2:"-3";s:4:"type";s:5:"range";s:6:"module";s:5:"range";s:6:"active";i:0;s:8:"settings";a:0:{}}s:8:"settings";a:7:{s:3:"min";s:6:"-10.50";s:3:"max";s:5:"10.50";s:4:"from";a:3:{s:5:"label";s:4:"FROM";s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";}s:2:"to";a:3:{s:5:"label";s:2:"TO";s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";}s:5:"field";a:2:{s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";}s:8:"combined";a:2:{s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";}s:18:"user_register_form";b:0;}s:7:"display";a:2:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:17:"range_unformatted";s:6:"weight";s:1:"1";s:8:"settings";a:6:{s:15:"range_separator";s:1:"-";s:13:"range_combine";i:1;s:18:"from_prefix_suffix";i:0;s:16:"to_prefix_suffix";i:0;s:19:"field_prefix_suffix";i:0;s:22:"combined_prefix_suffix";i:1;}s:6:"module";s:5:"range";}s:6:"teaser";a:4:{s:5:"label";s:5:"above";s:4:"type";s:6:"hidden";s:6:"weight";s:1:"0";s:8:"settings";a:0:{}}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";a:1:{i:0;a:2:{s:4:"from";s:3:"2.5";s:2:"to";s:3:"4.5";}}}',
'deleted' => '0',
))
->values(array(
'id' => '4',
'field_id' => '4',
'field_name' => 'field_integer',
'entity_type' => 'node',
'bundle' => 'page',
'data' => 'a:7:{s:5:"label";s:7:"Integer";s:6:"widget";a:5:{s:6:"weight";s:2:"-2";s:4:"type";s:5:"range";s:6:"module";s:5:"range";s:6:"active";i:0;s:8:"settings";a:0:{}}s:8:"settings";a:7:{s:3:"min";s:0:"";s:3:"max";s:0:"";s:4:"from";a:3:{s:5:"label";s:4:"From";s:6:"prefix";s:11:"FROM Prefix";s:6:"suffix";s:11:"FROM Suffix";}s:2:"to";a:3:{s:5:"label";s:2:"to";s:6:"prefix";s:9:"TO PREFIX";s:6:"suffix";s:9:"TO SUFFIX";}s:5:"field";a:2:{s:6:"prefix";s:12:"FIELD PREFIX";s:6:"suffix";s:12:"FIELD SUFFIX";}s:8:"combined";a:2:{s:6:"prefix";s:15:"COMBINED PREFIX";s:6:"suffix";s:15:"COMBINED SUFFIX";}s:18:"user_register_form";b:0;}s:7:"display";a:2:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:13:"range_integer";s:6:"weight";s:1:"2";s:8:"settings";a:9:{s:15:"range_separator";s:1:"-";s:13:"range_combine";i:1;s:18:"from_prefix_suffix";i:0;s:16:"to_prefix_suffix";i:1;s:19:"field_prefix_suffix";i:0;s:22:"combined_prefix_suffix";i:0;s:18:"thousand_separator";s:1:" ";s:17:"decimal_separator";s:1:".";s:5:"scale";i:0;}s:6:"module";s:5:"range";}s:6:"teaser";a:5:{s:5:"label";s:5:"above";s:4:"type";s:21:"range_integer_sprintf";s:6:"weight";s:1:"0";s:8:"settings";a:7:{s:13:"format_string";s:2:"%x";s:15:"range_separator";s:1:"|";s:13:"range_combine";i:1;s:18:"from_prefix_suffix";i:0;s:16:"to_prefix_suffix";i:0;s:19:"field_prefix_suffix";i:0;s:22:"combined_prefix_suffix";i:0;}s:6:"module";s:5:"range";}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}',
'deleted' => '0',
))
->execute();
$connection
->schema()
->createTable('field_data_field_decimal', array(
'fields' => array(
'entity_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'bundle' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'entity_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'revision_id' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
'unsigned' => TRUE,
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'delta' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'field_decimal_from' => array(
'type' => 'numeric',
'not null' => FALSE,
'precision' => '12',
'scale' => '4',
),
'field_decimal_to' => array(
'type' => 'numeric',
'not null' => FALSE,
'precision' => '12',
'scale' => '4',
),
),
'primary key' => array(
'entity_type',
'entity_id',
'deleted',
'delta',
'language',
),
'indexes' => array(
'entity_type' => array(
'entity_type',
),
'bundle' => array(
'bundle',
),
'deleted' => array(
'deleted',
),
'entity_id' => array(
'entity_id',
),
'revision_id' => array(
'revision_id',
),
'language' => array(
'language',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('field_data_field_decimal')
->fields(array(
'entity_type',
'bundle',
'deleted',
'entity_id',
'revision_id',
'language',
'delta',
'field_decimal_from',
'field_decimal_to',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'page',
'deleted' => '0',
'entity_id' => '1',
'revision_id' => '1',
'language' => 'und',
'delta' => '0',
'field_decimal_from' => '12.0000',
'field_decimal_to' => '18.0000',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'page',
'deleted' => '0',
'entity_id' => '1',
'revision_id' => '1',
'language' => 'und',
'delta' => '1',
'field_decimal_from' => '-44.3300',
'field_decimal_to' => '66.7700',
))
->execute();
$connection
->schema()
->createTable('field_data_field_float', array(
'fields' => array(
'entity_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'bundle' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'entity_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'revision_id' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
'unsigned' => TRUE,
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'delta' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'field_float_from' => array(
'type' => 'float',
'not null' => FALSE,
'size' => 'normal',
),
'field_float_to' => array(
'type' => 'float',
'not null' => FALSE,
'size' => 'normal',
),
),
'primary key' => array(
'entity_type',
'entity_id',
'deleted',
'delta',
'language',
),
'indexes' => array(
'entity_type' => array(
'entity_type',
),
'bundle' => array(
'bundle',
),
'deleted' => array(
'deleted',
),
'entity_id' => array(
'entity_id',
),
'revision_id' => array(
'revision_id',
),
'language' => array(
'language',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('field_data_field_float')
->fields(array(
'entity_type',
'bundle',
'deleted',
'entity_id',
'revision_id',
'language',
'delta',
'field_float_from',
'field_float_to',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'page',
'deleted' => '0',
'entity_id' => '1',
'revision_id' => '1',
'language' => 'und',
'delta' => '0',
'field_float_from' => '2.5',
'field_float_to' => '4.5',
))
->execute();
$connection
->schema()
->createTable('field_data_field_integer', array(
'fields' => array(
'entity_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'bundle' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'entity_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'revision_id' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
'unsigned' => TRUE,
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'delta' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'field_integer_from' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
),
'field_integer_to' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
),
),
'primary key' => array(
'entity_type',
'entity_id',
'deleted',
'delta',
'language',
),
'indexes' => array(
'entity_type' => array(
'entity_type',
),
'bundle' => array(
'bundle',
),
'deleted' => array(
'deleted',
),
'entity_id' => array(
'entity_id',
),
'revision_id' => array(
'revision_id',
),
'language' => array(
'language',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('field_data_field_integer')
->fields(array(
'entity_type',
'bundle',
'deleted',
'entity_id',
'revision_id',
'language',
'delta',
'field_integer_from',
'field_integer_to',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'page',
'deleted' => '0',
'entity_id' => '1',
'revision_id' => '1',
'language' => 'und',
'delta' => '0',
'field_integer_from' => '8',
'field_integer_to' => '111111',
))
->execute();
$connection
->schema()
->createTable('field_revision_field_decimal', array(
'fields' => array(
'entity_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'bundle' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'entity_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'revision_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'delta' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'field_decimal_from' => array(
'type' => 'numeric',
'not null' => FALSE,
'precision' => '12',
'scale' => '4',
),
'field_decimal_to' => array(
'type' => 'numeric',
'not null' => FALSE,
'precision' => '12',
'scale' => '4',
),
),
'primary key' => array(
'entity_type',
'entity_id',
'revision_id',
'deleted',
'delta',
'language',
),
'indexes' => array(
'entity_type' => array(
'entity_type',
),
'bundle' => array(
'bundle',
),
'deleted' => array(
'deleted',
),
'entity_id' => array(
'entity_id',
),
'revision_id' => array(
'revision_id',
),
'language' => array(
'language',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('field_revision_field_decimal')
->fields(array(
'entity_type',
'bundle',
'deleted',
'entity_id',
'revision_id',
'language',
'delta',
'field_decimal_from',
'field_decimal_to',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'page',
'deleted' => '0',
'entity_id' => '1',
'revision_id' => '1',
'language' => 'und',
'delta' => '0',
'field_decimal_from' => '12.0000',
'field_decimal_to' => '18.0000',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'page',
'deleted' => '0',
'entity_id' => '1',
'revision_id' => '1',
'language' => 'und',
'delta' => '1',
'field_decimal_from' => '-44.3300',
'field_decimal_to' => '66.7700',
))
->execute();
$connection
->schema()
->createTable('field_revision_field_float', array(
'fields' => array(
'entity_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'bundle' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'entity_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'revision_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'delta' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'field_float_from' => array(
'type' => 'float',
'not null' => FALSE,
'size' => 'normal',
),
'field_float_to' => array(
'type' => 'float',
'not null' => FALSE,
'size' => 'normal',
),
),
'primary key' => array(
'entity_type',
'entity_id',
'revision_id',
'deleted',
'delta',
'language',
),
'indexes' => array(
'entity_type' => array(
'entity_type',
),
'bundle' => array(
'bundle',
),
'deleted' => array(
'deleted',
),
'entity_id' => array(
'entity_id',
),
'revision_id' => array(
'revision_id',
),
'language' => array(
'language',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('field_revision_field_float')
->fields(array(
'entity_type',
'bundle',
'deleted',
'entity_id',
'revision_id',
'language',
'delta',
'field_float_from',
'field_float_to',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'page',
'deleted' => '0',
'entity_id' => '1',
'revision_id' => '1',
'language' => 'und',
'delta' => '0',
'field_float_from' => '2.5',
'field_float_to' => '4.5',
))
->execute();
$connection
->schema()
->createTable('field_revision_field_integer', array(
'fields' => array(
'entity_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'bundle' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'deleted' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'entity_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'revision_id' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'delta' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'field_integer_from' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
),
'field_integer_to' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
),
),
'primary key' => array(
'entity_type',
'entity_id',
'revision_id',
'deleted',
'delta',
'language',
),
'indexes' => array(
'entity_type' => array(
'entity_type',
),
'bundle' => array(
'bundle',
),
'deleted' => array(
'deleted',
),
'entity_id' => array(
'entity_id',
),
'revision_id' => array(
'revision_id',
),
'language' => array(
'language',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('field_revision_field_integer')
->fields(array(
'entity_type',
'bundle',
'deleted',
'entity_id',
'revision_id',
'language',
'delta',
'field_integer_from',
'field_integer_to',
))
->values(array(
'entity_type' => 'node',
'bundle' => 'page',
'deleted' => '0',
'entity_id' => '1',
'revision_id' => '1',
'language' => 'und',
'delta' => '0',
'field_integer_from' => '8',
'field_integer_to' => '111111',
))
->execute();
$connection
->schema()
->createTable('node', array(
'fields' => array(
'nid' => array(
'type' => 'serial',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'vid' => array(
'type' => 'int',
'not null' => FALSE,
'size' => 'normal',
'unsigned' => TRUE,
),
'type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
'default' => '',
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '12',
'default' => '',
),
'title' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'status' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '1',
),
'created' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'changed' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'comment' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'promote' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'sticky' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'tnid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
'unsigned' => TRUE,
),
'translate' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
),
'primary key' => array(
'nid',
),
'unique keys' => array(
'vid' => array(
'vid',
),
),
'indexes' => array(
'node_changed' => array(
'changed',
),
'node_created' => array(
'created',
),
'node_frontpage' => array(
'promote',
'status',
'sticky',
'created',
),
'node_status_type' => array(
'status',
'type',
'nid',
),
'node_title_type' => array(
'title',
array(
'type',
'4',
),
),
'node_type' => array(
array(
'type',
'4',
),
),
'uid' => array(
'uid',
),
'tnid' => array(
'tnid',
),
'translate' => array(
'translate',
),
'language' => array(
'language',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('node')
->fields(array(
'nid',
'vid',
'type',
'language',
'title',
'uid',
'status',
'created',
'changed',
'comment',
'promote',
'sticky',
'tnid',
'translate',
))
->values(array(
'nid' => '1',
'vid' => '1',
'type' => 'page',
'language' => 'und',
'title' => 'Test',
'uid' => '1',
'status' => '1',
'created' => '1589832747',
'changed' => '1590505905',
'comment' => '0',
'promote' => '0',
'sticky' => '0',
'tnid' => '0',
'translate' => '0',
))
->execute();
$connection
->schema()
->createTable('node_access', array(
'fields' => array(
'nid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
'unsigned' => TRUE,
),
'gid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
'unsigned' => TRUE,
),
'realm' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'grant_view' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
'unsigned' => TRUE,
),
'grant_update' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
'unsigned' => TRUE,
),
'grant_delete' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
'unsigned' => TRUE,
),
),
'primary key' => array(
'nid',
'gid',
'realm',
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('node_access')
->fields(array(
'nid',
'gid',
'realm',
'grant_view',
'grant_update',
'grant_delete',
))
->values(array(
'nid' => '0',
'gid' => '0',
'realm' => 'all',
'grant_view' => '1',
'grant_update' => '0',
'grant_delete' => '0',
))
->execute();
$connection
->schema()
->createTable('node_revision', array(
'fields' => array(
'nid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
'unsigned' => TRUE,
),
'vid' => array(
'type' => 'serial',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'title' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'log' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'status' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '1',
),
'comment' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'promote' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'sticky' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
),
'primary key' => array(
'vid',
),
'indexes' => array(
'nid' => array(
'nid',
),
'uid' => array(
'uid',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('node_revision')
->fields(array(
'nid',
'vid',
'uid',
'title',
'log',
'timestamp',
'status',
'comment',
'promote',
'sticky',
))
->values(array(
'nid' => '1',
'vid' => '1',
'uid' => '1',
'title' => 'Test',
'log' => '',
'timestamp' => '1590505905',
'status' => '1',
'comment' => '0',
'promote' => '0',
'sticky' => '0',
))
->execute();
$connection
->schema()
->createTable('node_type', array(
'fields' => array(
'type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '32',
),
'name' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'base' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
),
'module' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
),
'description' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'medium',
),
'help' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'medium',
),
'has_title' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'unsigned' => TRUE,
),
'title_label' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'custom' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'modified' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'locked' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'disabled' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'orig_type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
),
'primary key' => array(
'type',
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('node_type')
->fields(array(
'type',
'name',
'base',
'module',
'description',
'help',
'has_title',
'title_label',
'custom',
'modified',
'locked',
'disabled',
'orig_type',
))
->values(array(
'type' => 'page',
'name' => 'Page',
'base' => 'node_content',
'module' => 'node',
'description' => '',
'help' => '',
'has_title' => '1',
'title_label' => 'Title',
'custom' => '1',
'modified' => '1',
'locked' => '0',
'disabled' => '0',
'orig_type' => 'page',
))
->execute();
$connection
->schema()
->createTable('role', array(
'fields' => array(
'rid' => array(
'type' => 'serial',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'name' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '64',
'default' => '',
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
),
'primary key' => array(
'rid',
),
'unique keys' => array(
'name' => array(
'name',
),
),
'indexes' => array(
'name_weight' => array(
'name',
'weight',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('role')
->fields(array(
'rid',
'name',
'weight',
))
->values(array(
'rid' => '1',
'name' => 'anonymous user',
'weight' => '0',
))
->values(array(
'rid' => '2',
'name' => 'authenticated user',
'weight' => '1',
))
->execute();
$connection
->schema()
->createTable('role_permission', array(
'fields' => array(
'rid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'unsigned' => TRUE,
),
'permission' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'module' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
),
'primary key' => array(
'rid',
'permission',
),
'indexes' => array(
'permission' => array(
'permission',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('role_permission')
->fields(array(
'rid',
'permission',
'module',
))
->values(array(
'rid' => '1',
'permission' => 'access content',
'module' => 'node',
))
->values(array(
'rid' => '2',
'permission' => 'access content',
'module' => 'node',
))
->execute();
$connection
->schema()
->createTable('system', array(
'fields' => array(
'filename' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'name' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'type' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '12',
'default' => '',
),
'owner' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'status' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'bootstrap' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'schema_version' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'small',
'default' => '-1',
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'info' => array(
'type' => 'blob',
'not null' => FALSE,
'size' => 'normal',
),
),
'primary key' => array(
'filename',
),
'indexes' => array(
'system_list' => array(
'status',
'bootstrap',
'type',
'weight',
'name',
),
'type_name' => array(
'type',
'name',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('system')
->fields(array(
'filename',
'name',
'type',
'owner',
'status',
'bootstrap',
'schema_version',
'weight',
'info',
))
->values(array(
'filename' => 'modules/field/field.module',
'name' => 'field',
'type' => 'module',
'owner' => '',
'status' => '1',
'bootstrap' => '0',
'schema_version' => '7004',
'weight' => '0',
'info' => 'a:14:{s:4:"name";s:5:"Field";s:11:"description";s:57:"Field API to add fields to entities like nodes and users.";s:7:"package";s:4:"Core";s:7:"version";s:4:"7.69";s:4:"core";s:3:"7.x";s:5:"files";a:4:{i:0;s:12:"field.module";i:1;s:16:"field.attach.inc";i:2;s:20:"field.info.class.inc";i:3;s:16:"tests/field.test";}s:12:"dependencies";a:1:{i:0;s:17:"field_sql_storage";}s:8:"required";b:1;s:11:"stylesheets";a:1:{s:3:"all";a:1:{s:15:"theme/field.css";s:29:"modules/field/theme/field.css";}}s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1576696221";s:5:"mtime";i:1588886589;s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}',
))
->values(array(
'filename' => 'modules/field/modules/field_sql_storage/field_sql_storage.module',
'name' => 'field_sql_storage',
'type' => 'module',
'owner' => '',
'status' => '1',
'bootstrap' => '0',
'schema_version' => '7002',
'weight' => '0',
'info' => 'a:13:{s:4:"name";s:17:"Field SQL storage";s:11:"description";s:37:"Stores field data in an SQL database.";s:7:"package";s:4:"Core";s:7:"version";s:4:"7.69";s:4:"core";s:3:"7.x";s:12:"dependencies";a:1:{i:0;s:5:"field";}s:5:"files";a:1:{i:0;s:22:"field_sql_storage.test";}s:8:"required";b:1;s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1576696221";s:5:"mtime";i:1588886589;s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}',
))
->values(array(
'filename' => 'modules/node/node.module',
'name' => 'node',
'type' => 'module',
'owner' => '',
'status' => '1',
'bootstrap' => '0',
'schema_version' => '7016',
'weight' => '0',
'info' => 'a:15:{s:4:"name";s:4:"Node";s:11:"description";s:66:"Allows content to be submitted to the site and displayed on pages.";s:7:"package";s:4:"Core";s:7:"version";s:4:"7.69";s:4:"core";s:3:"7.x";s:5:"files";a:2:{i:0;s:11:"node.module";i:1;s:9:"node.test";}s:8:"required";b:1;s:9:"configure";s:21:"admin/structure/types";s:11:"stylesheets";a:1:{s:3:"all";a:1:{s:8:"node.css";s:21:"modules/node/node.css";}}s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1576696221";s:5:"mtime";i:1588886589;s:12:"dependencies";a:0:{}s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}',
))
->values(array(
'filename' => 'modules/user/user.module',
'name' => 'user',
'type' => 'module',
'owner' => '',
'status' => '1',
'bootstrap' => '0',
'schema_version' => '7019',
'weight' => '0',
'info' => 'a:15:{s:4:"name";s:4:"User";s:11:"description";s:47:"Manages the user registration and login system.";s:7:"package";s:4:"Core";s:7:"version";s:4:"7.69";s:4:"core";s:3:"7.x";s:5:"files";a:2:{i:0;s:11:"user.module";i:1;s:9:"user.test";}s:8:"required";b:1;s:9:"configure";s:19:"admin/config/people";s:11:"stylesheets";a:1:{s:3:"all";a:1:{s:8:"user.css";s:21:"modules/user/user.css";}}s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1576696221";s:5:"mtime";i:1588886589;s:12:"dependencies";a:0:{}s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}',
))
->execute();
$connection
->schema()
->createTable('users', array(
'fields' => array(
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
'unsigned' => TRUE,
),
'name' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '60',
'default' => '',
),
'pass' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '128',
'default' => '',
),
'mail' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => '254',
'default' => '',
),
'theme' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'signature' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '255',
'default' => '',
),
'signature_format' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => '255',
),
'created' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'access' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'login' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'status' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'tiny',
'default' => '0',
),
'timezone' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => '32',
),
'language' => array(
'type' => 'varchar',
'not null' => TRUE,
'length' => '12',
'default' => '',
),
'picture' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
),
'init' => array(
'type' => 'varchar',
'not null' => FALSE,
'length' => '254',
'default' => '',
),
'data' => array(
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
),
),
'primary key' => array(
'uid',
),
'unique keys' => array(
'name' => array(
'name',
),
),
'indexes' => array(
'access' => array(
'access',
),
'created' => array(
'created',
),
'mail' => array(
'mail',
),
'picture' => array(
'picture',
),
),
'mysql_character_set' => 'utf8',
));
$connection
->insert('users')
->fields(array(
'uid',
'name',
'pass',
'mail',
'theme',
'signature',
'signature_format',
'created',
'access',
'login',
'status',
'timezone',
'language',
'picture',
'init',
'data',
))
->values(array(
'uid' => '0',
'name' => '',
'pass' => '',
'mail' => '',
'theme' => '',
'signature' => '',
'signature_format' => NULL,
'created' => '0',
'access' => '0',
'login' => '0',
'status' => '0',
'timezone' => NULL,
'language' => '',
'picture' => '0',
'init' => '',
'data' => NULL,
))
->values(array(
'uid' => '1',
'name' => 'root',
'pass' => '',
'mail' => 'root@localhost',
'theme' => '',
'signature' => '',
'signature_format' => NULL,
'created' => '1588965506',
'access' => '1590505822',
'login' => '1589382271',
'status' => '1',
'timezone' => 'Europe/Helsinki',
'language' => '',
'picture' => '0',
'init' => 'root@localhost',
'data' => 'b:0;',
))
->execute();
$connection
->schema()
->createTable('users_roles', array(
'fields' => array(
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
'unsigned' => TRUE,
),
'rid' => array(
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
'default' => '0',
'unsigned' => TRUE,
),
),
'primary key' => array(
'uid',
'rid',
),
'indexes' => array(
'rid' => array(
'rid',
),
),
'mysql_character_set' => 'utf8',
));