diff --git a/core/modules/field/migration_templates/d7_field_instance.yml b/core/modules/field/migration_templates/d7_field_instance.yml index e18b2732a3edfb1630c6b22774122939ae40b4fe..9fd68dcf5e7af65bbc248bcc6d8b1e2074138813 100644 --- a/core/modules/field/migration_templates/d7_field_instance.yml +++ b/core/modules/field/migration_templates/d7_field_instance.yml @@ -9,6 +9,10 @@ source: constants: status: true process: + type: + plugin: process_field + source: type + method: getFieldType entity_type: entity_type field_name: field_name bundle: bundle diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php index ef12ac1617718c7f6c94c179c0f95cfb6b7f5527..87a5f2f67d35105dc74e14105d201db88fc922c7 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php @@ -88,15 +88,15 @@ protected function assertEntity($id, $expected_label, $expected_field_type, $is_ /** @var \Drupal\field\FieldConfigInterface $field */ $field = FieldConfig::load($id); - $this->assertTrue($field instanceof FieldConfigInterface); - $this->assertIdentical($expected_label, $field->label()); - $this->assertIdentical($expected_field_type, $field->getType()); - $this->assertIdentical($expected_entity_type, $field->getTargetEntityTypeId()); - $this->assertIdentical($expected_bundle, $field->getTargetBundle()); - $this->assertIdentical($expected_name, $field->getName()); - $this->assertEqual($is_required, $field->isRequired()); - $this->assertIdentical($expected_entity_type . '.' . $expected_name, $field->getFieldStorageDefinition()->id()); - $this->assertSame($expected_translatable, $field->isTranslatable()); + $this->assertInstanceOf(FieldConfigInterface::class, $field); + $this->assertEquals($expected_label, $field->label()); + $this->assertEquals($expected_field_type, $field->getType()); + $this->assertEquals($expected_entity_type, $field->getTargetEntityTypeId()); + $this->assertEquals($expected_bundle, $field->getTargetBundle()); + $this->assertEquals($expected_name, $field->getName()); + $this->assertEquals($is_required, $field->isRequired()); + $this->assertEquals($expected_entity_type . '.' . $expected_name, $field->getFieldStorageDefinition()->id()); + $this->assertEquals($expected_translatable, $field->isTranslatable()); } /** @@ -144,7 +144,7 @@ public function testFieldInstances() { $this->assertEntity('node.test_content_type.field_integer_list', 'Integer List', 'list_integer', FALSE, FALSE); $this->assertEntity('node.test_content_type.field_long_text', 'Long text', 'text_with_summary', FALSE, FALSE); $this->assertEntity('node.test_content_type.field_term_reference', 'Term Reference', 'entity_reference', FALSE, FALSE); - $this->assertEntity('node.test_content_type.field_text', 'Text', 'text', FALSE, FALSE); + $this->assertEntity('node.test_content_type.field_text', 'Text', 'string', FALSE, FALSE); $this->assertEntity('comment.comment_node_test_content_type.field_integer', 'Integer', 'integer', FALSE, FALSE); $this->assertEntity('user.user.field_file', 'File', 'file', FALSE, FALSE); @@ -154,4 +154,61 @@ public function testFieldInstances() { $this->assertLinkFields('node.blog.field_link', DRUPAL_REQUIRED); } + /** + * Tests the migration of text field instances with different text processing. + */ + public function testTextFieldInstances() { + // All text and text_long field instances using a field base that has only + // plain text instances should be migrated to string and string_long fields. + // All text_with_summary field instances using a field base that has only + // plain text instances should not have been migrated since there's no such + // thing as a string_with_summary field. + $this->assertEntity('node.page.field_text_plain', 'Text plain', 'string', FALSE, FALSE); + $this->assertEntity('node.article.field_text_plain', 'Text plain', 'string', FALSE, TRUE); + $this->assertEntity('node.page.field_text_long_plain', 'Text long plain', 'string_long', FALSE, FALSE); + $this->assertEntity('node.article.field_text_long_plain', 'Text long plain', 'string_long', FALSE, TRUE); + $this->assertNull(FieldConfig::load('node.page.field_text_sum_plain')); + $this->assertNull(FieldConfig::load('node.article.field_text_sum_plain')); + + // All text, text_long and text_with_summary field instances using a field + // base that has only filtered text instances should be migrated to text, + // text_long and text_with_summary fields. + $this->assertEntity('node.page.field_text_filtered', 'Text filtered', 'text', FALSE, FALSE); + $this->assertEntity('node.article.field_text_filtered', 'Text filtered', 'text', FALSE, TRUE); + $this->assertEntity('node.page.field_text_long_filtered', 'Text long filtered', 'text_long', FALSE, FALSE); + $this->assertEntity('node.article.field_text_long_filtered', 'Text long filtered', 'text_long', FALSE, TRUE); + $this->assertEntity('node.page.field_text_sum_filtered', 'Text summary filtered', 'text_with_summary', FALSE, FALSE); + $this->assertEntity('node.article.field_text_sum_filtered', 'Text summary filtered', 'text_with_summary', FALSE, TRUE); + + // All text, text_long and text_with_summary field instances using a field + // base that has both plain text and filtered text instances should not have + // been migrated. + $this->assertNull(FieldConfig::load('node.page.field_text_plain_filtered')); + $this->assertNull(FieldConfig::load('node.article.field_text_plain_filtered')); + $this->assertNull(FieldConfig::load('node.page.field_text_long_plain_filtered')); + $this->assertNull(FieldConfig::load('node.article.field_text_long_plain_filtered')); + $this->assertNull(FieldConfig::load('node.page.field_text_sum_plain_filtered')); + $this->assertNull(FieldConfig::load('node.article.field_text_sum_plain_filtered')); + + // For each text field instances that were skipped, there should be a log + // message with the required steps to fix this. + $migration = $this->getMigration('d7_field_instance'); + $messages = $migration->getIdMap()->getMessageIterator()->fetchAll(); + $errors = array_map(function($message) {return $message->message;}, $messages); + $this->assertCount(8, $errors); + sort($errors); + $message = 'Can\'t migrate source field field_text_long_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'; + $this->assertEquals($errors[0], $message); + $this->assertEquals($errors[1], $message); + $message = 'Can\'t migrate source field field_text_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'; + $this->assertEquals($errors[2], $message); + $this->assertEquals($errors[3], $message); + $message = 'Can\'t migrate source field field_text_sum_plain of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'; + $this->assertEquals($errors[4], $message); + $this->assertEquals($errors[5], $message); + $message = 'Can\'t migrate source field field_text_sum_plain_filtered of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'; + $this->assertEquals($errors[6], $message); + $this->assertEquals($errors[7], $message); + } + } diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php index c0af33898a506d62444f703a9690a1d5734db347..da4bb48b349d0f40df07ea20fba94e9ceb359d35 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php @@ -57,11 +57,11 @@ protected function assertEntity($id, $expected_type, $expected_translatable, $ex /** @var \Drupal\field\FieldStorageConfigInterface $field */ $field = FieldStorageConfig::load($id); - $this->assertTrue($field instanceof FieldStorageConfigInterface); - $this->assertIdentical($expected_name, $field->getName()); - $this->assertIdentical($expected_type, $field->getType()); - $this->assertEqual($expected_translatable, $field->isTranslatable()); - $this->assertIdentical($expected_entity_type, $field->getTargetEntityTypeId()); + $this->assertInstanceOf(FieldStorageConfigInterface::class, $field); + $this->assertEquals($expected_name, $field->getName()); + $this->assertEquals($expected_type, $field->getType()); + $this->assertEquals($expected_translatable, $field->isTranslatable()); + $this->assertEquals($expected_entity_type, $field->getTargetEntityTypeId()); if ($expected_cardinality === 1) { $this->assertFalse($field->isMultiple()); @@ -69,7 +69,7 @@ protected function assertEntity($id, $expected_type, $expected_translatable, $ex else { $this->assertTrue($field->isMultiple()); } - $this->assertIdentical($expected_cardinality, $field->getCardinality()); + $this->assertEquals($expected_cardinality, $field->getCardinality()); } /** @@ -91,7 +91,7 @@ public function testFields() { $this->assertEntity('node.field_tags', 'entity_reference', TRUE, -1); $this->assertEntity('node.field_term_reference', 'entity_reference', TRUE, 1); $this->assertEntity('node.taxonomy_forums', 'entity_reference', TRUE, 1); - $this->assertEntity('node.field_text', 'text', TRUE, 1); + $this->assertEntity('node.field_text', 'string', TRUE, 1); $this->assertEntity('node.field_text_list', 'list_string', TRUE, 3); $this->assertEntity('node.field_boolean', 'boolean', TRUE, 1); $this->assertEntity('node.field_email', 'email', TRUE, -1); @@ -105,24 +105,57 @@ public function testFields() { // Assert that the taxonomy term reference fields are referencing the // correct entity type. $field = FieldStorageConfig::load('node.field_term_reference'); - $this->assertIdentical('taxonomy_term', $field->getSetting('target_type')); + $this->assertEquals('taxonomy_term', $field->getSetting('target_type')); $field = FieldStorageConfig::load('node.taxonomy_forums'); - $this->assertIdentical('taxonomy_term', $field->getSetting('target_type')); + $this->assertEquals('taxonomy_term', $field->getSetting('target_type')); // Assert that the entityreference fields are referencing the correct // entity type. $field = FieldStorageConfig::load('node.field_node_entityreference'); - $this->assertIdentical('node', $field->getSetting('target_type')); + $this->assertEquals('node', $field->getSetting('target_type')); $field = FieldStorageConfig::load('node.field_user_entityreference'); - $this->assertIdentical('user', $field->getSetting('target_type')); + $this->assertEquals('user', $field->getSetting('target_type')); $field = FieldStorageConfig::load('node.field_term_entityreference'); - $this->assertIdentical('taxonomy_term', $field->getSetting('target_type')); + $this->assertEquals('taxonomy_term', $field->getSetting('target_type')); + } + + /** + * Tests the migration of text fields with different text processing. + */ + public function testTextFields() { + // All text and text_long field bases that have only plain text instances + // should be migrated to string and string_long fields. + // All text_with_summary field bases that have only plain text instances + // should not have been migrated since there's no such thing as a + // string_with_summary field. + $this->assertEntity('node.field_text_plain', 'string', TRUE, 1); + $this->assertEntity('node.field_text_long_plain', 'string_long', TRUE, 1); + $this->assertNull(FieldStorageConfig::load('node.field_text_sum_plain')); + + // All text, text_long and text_with_summary field bases that have only + // filtered text instances should be migrated to text, text_long and + // text_with_summary fields. + $this->assertEntity('node.field_text_filtered', 'text', TRUE, 1); + $this->assertEntity('node.field_text_long_filtered', 'text_long', TRUE, 1); + $this->assertEntity('node.field_text_sum_filtered', 'text_with_summary', TRUE, 1); + + // All text, text_long and text_with_summary field bases that have both + // plain text and filtered text instances should not have been migrated. + $this->assertNull(FieldStorageConfig::load('node.field_text_plain_filtered')); + $this->assertNull(FieldStorageConfig::load('node.field_text_long_plain_filtered')); + $this->assertNull(FieldStorageConfig::load('node.field_text_sum_plain_filtered')); - // Validate that the source count and processed count match up. - /** @var \Drupal\migrate\Plugin\MigrationInterface $migration */ + // For each text field bases that were skipped, there should be a log + // message with the required steps to fix this. $migration = $this->getMigration('d7_field'); - $this->assertSame($migration->getSourcePlugin() - ->count(), $migration->getIdMap()->processedCount()); + $messages = $migration->getIdMap()->getMessageIterator()->fetchAll(); + $errors = array_map(function($message) {return $message->message;}, $messages); + sort($errors); + $this->assertCount(4, $errors); + $this->assertEquals($errors[0], 'Can\'t migrate source field field_text_long_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'); + $this->assertEquals($errors[1], 'Can\'t migrate source field field_text_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'); + $this->assertEquals($errors[2], 'Can\'t migrate source field field_text_sum_plain of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'); + $this->assertEquals($errors[3], 'Can\'t migrate source field field_text_sum_plain_filtered of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'); } } diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal7.php b/core/modules/migrate_drupal/tests/fixtures/drupal7.php index 5c9fea9f92d86fe69d9c6de0072733462d341033..f1ccf8a72b9954ba14a98d091c3c02ce5c4fd234 100644 --- a/core/modules/migrate_drupal/tests/fixtures/drupal7.php +++ b/core/modules/migrate_drupal/tests/fixtures/drupal7.php @@ -3441,6 +3441,141 @@ 'translatable' => '0', 'deleted' => '0', )) +->values(array( + 'id' => '26', + 'field_name' => 'field_text_plain', + 'type' => 'text', + 'module' => 'text', + '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:10:"max_length";s:3:"255";}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:27:"field_data_field_text_plain";a:2:{s:5:"value";s:22:"field_text_plain_value";s:6:"format";s:23:"field_text_plain_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:31:"field_revision_field_text_plain";a:2:{s:5:"value";s:22:"field_text_plain_value";s:6:"format";s:23:"field_text_plain_format";}}}}}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";}}s:2:"id";s:2:"26";}', + 'cardinality' => '1', + 'translatable' => '0', + 'deleted' => '0', +)) +->values(array( + 'id' => '27', + 'field_name' => 'field_text_filtered', + 'type' => 'text', + 'module' => 'text', + '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:10:"max_length";s:3:"255";}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:30:"field_data_field_text_filtered";a:2:{s:5:"value";s:25:"field_text_filtered_value";s:6:"format";s:26:"field_text_filtered_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:34:"field_revision_field_text_filtered";a:2:{s:5:"value";s:25:"field_text_filtered_value";s:6:"format";s:26:"field_text_filtered_format";}}}}}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";}}s:2:"id";s:2:"27";}', + 'cardinality' => '1', + 'translatable' => '0', + 'deleted' => '0', +)) +->values(array( + 'id' => '28', + 'field_name' => 'field_text_plain_filtered', + 'type' => 'text', + 'module' => 'text', + '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:10:"max_length";s:3:"255";}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:36:"field_data_field_text_plain_filtered";a:2:{s:5:"value";s:31:"field_text_plain_filtered_value";s:6:"format";s:32:"field_text_plain_filtered_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:40:"field_revision_field_text_plain_filtered";a:2:{s:5:"value";s:31:"field_text_plain_filtered_value";s:6:"format";s:32:"field_text_plain_filtered_format";}}}}}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";}}s:2:"id";s:2:"28";}', + 'cardinality' => '1', + 'translatable' => '0', + 'deleted' => '0', +)) +->values(array( + 'id' => '29', + 'field_name' => 'field_text_long_plain', + 'type' => 'text_long', + 'module' => 'text', + '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:32:"field_data_field_text_long_plain";a:2:{s:5:"value";s:27:"field_text_long_plain_value";s:6:"format";s:28:"field_text_long_plain_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:36:"field_revision_field_text_long_plain";a:2:{s:5:"value";s:27:"field_text_long_plain_value";s:6:"format";s:28:"field_text_long_plain_format";}}}}}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";}}s:2:"id";s:2:"29";}', + 'cardinality' => '1', + 'translatable' => '0', + 'deleted' => '0', +)) +->values(array( + 'id' => '30', + 'field_name' => 'field_text_long_filtered', + 'type' => 'text_long', + 'module' => 'text', + '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:35:"field_data_field_text_long_filtered";a:2:{s:5:"value";s:30:"field_text_long_filtered_value";s:6:"format";s:31:"field_text_long_filtered_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:39:"field_revision_field_text_long_filtered";a:2:{s:5:"value";s:30:"field_text_long_filtered_value";s:6:"format";s:31:"field_text_long_filtered_format";}}}}}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";}}s:2:"id";s:2:"30";}', + 'cardinality' => '1', + 'translatable' => '0', + 'deleted' => '0', +)) +->values(array( + 'id' => '31', + 'field_name' => 'field_text_long_plain_filtered', + 'type' => 'text_long', + 'module' => 'text', + '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:41:"field_data_field_text_long_plain_filtered";a:2:{s:5:"value";s:36:"field_text_long_plain_filtered_value";s:6:"format";s:37:"field_text_long_plain_filtered_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:45:"field_revision_field_text_long_plain_filtered";a:2:{s:5:"value";s:36:"field_text_long_plain_filtered_value";s:6:"format";s:37:"field_text_long_plain_filtered_format";}}}}}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";}}s:2:"id";s:2:"31";}', + 'cardinality' => '1', + 'translatable' => '0', + 'deleted' => '0', +)) +->values(array( + 'id' => '32', + 'field_name' => 'field_text_sum_plain', + '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: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:31:"field_data_field_text_sum_plain";a:3:{s:5:"value";s:26:"field_text_sum_plain_value";s:7:"summary";s:28:"field_text_sum_plain_summary";s:6:"format";s:27:"field_text_sum_plain_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:35:"field_revision_field_text_sum_plain";a:3:{s:5:"value";s:26:"field_text_sum_plain_value";s:7:"summary";s:28:"field_text_sum_plain_summary";s:6:"format";s:27:"field_text_sum_plain_format";}}}}}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";}}s:2:"id";s:2:"32";}', + 'cardinality' => '1', + 'translatable' => '0', + 'deleted' => '0', +)) +->values(array( + 'id' => '33', + 'field_name' => 'field_text_sum_filtered', + '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: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:34:"field_data_field_text_sum_filtered";a:3:{s:5:"value";s:29:"field_text_sum_filtered_value";s:7:"summary";s:31:"field_text_sum_filtered_summary";s:6:"format";s:30:"field_text_sum_filtered_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:38:"field_revision_field_text_sum_filtered";a:3:{s:5:"value";s:29:"field_text_sum_filtered_value";s:7:"summary";s:31:"field_text_sum_filtered_summary";s:6:"format";s:30:"field_text_sum_filtered_format";}}}}}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";}}s:2:"id";s:2:"33";}', + 'cardinality' => '1', + 'translatable' => '0', + 'deleted' => '0', +)) +->values(array( + 'id' => '34', + 'field_name' => 'field_text_sum_plain_filtered', + '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: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:39:"field_data_field_text_sum_plain_filtere";a:3:{s:5:"value";s:34:"field_text_sum_plain_filtere_value";s:7:"summary";s:36:"field_text_sum_plain_filtere_summary";s:6:"format";s:35:"field_text_sum_plain_filtere_format";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:43:"field_revision_field_text_sum_plain_filtere";a:3:{s:5:"value";s:34:"field_text_sum_plain_filtere_value";s:7:"summary";s:36:"field_text_sum_plain_filtere_summary";s:6:"format";s:35:"field_text_sum_plain_filtere_format";}}}}}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";}}s:2:"id";s:2:"34";}', + 'cardinality' => '1', + 'translatable' => '0', + 'deleted' => '0', +)) ->execute(); $connection->schema()->createTable('field_config_instance', array( @@ -3861,6 +3996,168 @@ 'data' => 'a:6:{s:5:"label";s:12:"Private file";s:6:"widget";a:5:{s:6:"weight";s:2:"19";s:4:"type";s:12:"file_generic";s:6:"module";s:4:"file";s:6:"active";i:1;s:8:"settings";a:1:{s:18:"progress_indicator";s:8:"throbber";}}s:8:"settings";a:5:{s:14:"file_directory";s:0:"";s:15:"file_extensions";s:3:"txt";s:12:"max_filesize";s:0:"";s:17:"description_field";i:0;s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"file_default";s:8:"settings";a:0:{}s:6:"module";s:4:"file";s:6:"weight";i:18;}}s:8:"required";i:0;s:11:"description";s:0:"";}', 'deleted' => '0', )) +->values(array( + 'id' => '43', + 'field_id' => '26', + 'field_name' => 'field_text_plain', + 'entity_type' => 'node', + 'bundle' => 'article', + 'data' => 'a:7:{s:5:"label";s:10:"Text plain";s:6:"widget";a:5:{s:6:"weight";s:2:"11";s:4:"type";s:14:"text_textfield";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"size";s:2:"60";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"0";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:11;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '44', + 'field_id' => '27', + 'field_name' => 'field_text_filtered', + 'entity_type' => 'node', + 'bundle' => 'article', + 'data' => 'a:7:{s:5:"label";s:13:"Text filtered";s:6:"widget";a:5:{s:6:"weight";s:2:"12";s:4:"type";s:14:"text_textfield";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"size";s:2:"60";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"1";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:12;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '45', + 'field_id' => '28', + 'field_name' => 'field_text_plain_filtered', + 'entity_type' => 'node', + 'bundle' => 'article', + 'data' => 'a:7:{s:5:"label";s:23:"Text plain and filtered";s:6:"widget";a:5:{s:6:"weight";s:2:"13";s:4:"type";s:14:"text_textfield";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"size";s:2:"60";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"0";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:13;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '46', + 'field_id' => '29', + 'field_name' => 'field_text_long_plain', + 'entity_type' => 'node', + 'bundle' => 'article', + 'data' => 'a:7:{s:5:"label";s:15:"Text long plain";s:6:"widget";a:5:{s:6:"weight";s:2:"14";s:4:"type";s:13:"text_textarea";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"rows";s:1:"5";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"0";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:14;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '47', + 'field_id' => '30', + 'field_name' => 'field_text_long_filtered', + 'entity_type' => 'node', + 'bundle' => 'article', + 'data' => 'a:7:{s:5:"label";s:18:"Text long filtered";s:6:"widget";a:5:{s:6:"weight";s:2:"15";s:4:"type";s:13:"text_textarea";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"rows";s:1:"5";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"1";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:15;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '48', + 'field_id' => '31', + 'field_name' => 'field_text_long_plain_filtered', + 'entity_type' => 'node', + 'bundle' => 'article', + 'data' => 'a:7:{s:5:"label";s:28:"Text long plain and filtered";s:6:"widget";a:5:{s:6:"weight";s:2:"16";s:4:"type";s:13:"text_textarea";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"rows";s:1:"5";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"0";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:16;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '49', + 'field_id' => '32', + 'field_name' => 'field_text_sum_plain', + 'entity_type' => 'node', + 'bundle' => 'article', + 'data' => 'a:7:{s:5:"label";s:18:"Text summary plain";s:6:"widget";a:5:{s:6:"weight";s:2:"17";s:4:"type";s:26:"text_textarea_with_summary";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:2:{s:4:"rows";s:2:"20";s:12:"summary_rows";i:5;}}s:8:"settings";a:3:{s:15:"text_processing";s:1:"0";s:15:"display_summary";i:0;s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:17;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '50', + 'field_id' => '33', + 'field_name' => 'field_text_sum_filtered', + 'entity_type' => 'node', + 'bundle' => 'article', + 'data' => 'a:7:{s:5:"label";s:21:"Text summary filtered";s:6:"widget";a:5:{s:6:"weight";s:2:"18";s:4:"type";s:26:"text_textarea_with_summary";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:2:{s:4:"rows";s:2:"20";s:12:"summary_rows";i:5;}}s:8:"settings";a:3:{s:15:"text_processing";s:1:"1";s:15:"display_summary";i:0;s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:18;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '51', + 'field_id' => '34', + 'field_name' => 'field_text_sum_plain_filtered', + 'entity_type' => 'node', + 'bundle' => 'article', + 'data' => 'a:7:{s:5:"label";s:31:"Text summary plain and filtered";s:6:"widget";a:5:{s:6:"weight";s:2:"19";s:4:"type";s:26:"text_textarea_with_summary";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:2:{s:4:"rows";s:2:"20";s:12:"summary_rows";i:5;}}s:8:"settings";a:3:{s:15:"text_processing";s:1:"0";s:15:"display_summary";i:0;s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:19;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '52', + 'field_id' => '26', + 'field_name' => 'field_text_plain', + 'entity_type' => 'node', + 'bundle' => 'page', + 'data' => 'a:7:{s:5:"label";s:10:"Text plain";s:6:"widget";a:5:{s:6:"weight";s:2:"-2";s:4:"type";s:14:"text_textfield";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"size";s:2:"60";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"0";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:1;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '53', + 'field_id' => '27', + 'field_name' => 'field_text_filtered', + 'entity_type' => 'node', + 'bundle' => 'page', + 'data' => 'a:7:{s:5:"label";s:13:"Text filtered";s:6:"widget";a:5:{s:6:"weight";s:1:"0";s:4:"type";s:14:"text_textfield";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"size";s:2:"60";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"1";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:2;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '54', + 'field_id' => '28', + 'field_name' => 'field_text_plain_filtered', + 'entity_type' => 'node', + 'bundle' => 'page', + 'data' => 'a:7:{s:5:"label";s:23:"Text plain and filtered";s:6:"widget";a:5:{s:6:"weight";s:1:"2";s:4:"type";s:14:"text_textfield";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"size";s:2:"60";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"1";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:3;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '55', + 'field_id' => '29', + 'field_name' => 'field_text_long_plain', + 'entity_type' => 'node', + 'bundle' => 'page', + 'data' => 'a:7:{s:5:"label";s:15:"Text long plain";s:6:"widget";a:5:{s:6:"weight";s:1:"4";s:4:"type";s:13:"text_textarea";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"rows";s:1:"5";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"0";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:4;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '56', + 'field_id' => '30', + 'field_name' => 'field_text_long_filtered', + 'entity_type' => 'node', + 'bundle' => 'page', + 'data' => 'a:7:{s:5:"label";s:18:"Text long filtered";s:6:"widget";a:5:{s:6:"weight";s:1:"6";s:4:"type";s:13:"text_textarea";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"rows";s:1:"5";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"1";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:5;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '57', + 'field_id' => '31', + 'field_name' => 'field_text_long_plain_filtered', + 'entity_type' => 'node', + 'bundle' => 'page', + 'data' => 'a:7:{s:5:"label";s:28:"Text long plain and filtered";s:6:"widget";a:5:{s:6:"weight";s:1:"8";s:4:"type";s:13:"text_textarea";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:1:{s:4:"rows";s:1:"5";}}s:8:"settings";a:2:{s:15:"text_processing";s:1:"1";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:6;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '58', + 'field_id' => '32', + 'field_name' => 'field_text_sum_plain', + 'entity_type' => 'node', + 'bundle' => 'page', + 'data' => 'a:7:{s:5:"label";s:18:"Text summary plain";s:6:"widget";a:5:{s:6:"weight";s:2:"10";s:4:"type";s:26:"text_textarea_with_summary";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:2:{s:4:"rows";s:2:"20";s:12:"summary_rows";i:5;}}s:8:"settings";a:3:{s:15:"text_processing";s:1:"0";s:15:"display_summary";i:0;s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:7;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '59', + 'field_id' => '33', + 'field_name' => 'field_text_sum_filtered', + 'entity_type' => 'node', + 'bundle' => 'page', + 'data' => 'a:7:{s:5:"label";s:21:"Text summary filtered";s:6:"widget";a:5:{s:6:"weight";s:2:"12";s:4:"type";s:26:"text_textarea_with_summary";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:2:{s:4:"rows";s:2:"20";s:12:"summary_rows";i:5;}}s:8:"settings";a:3:{s:15:"text_processing";s:1:"1";s:15:"display_summary";i:0;s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:8;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) +->values(array( + 'id' => '60', + 'field_id' => '34', + 'field_name' => 'field_text_sum_plain_filtered', + 'entity_type' => 'node', + 'bundle' => 'page', + 'data' => 'a:7:{s:5:"label";s:31:"Text summary plain and filtered";s:6:"widget";a:5:{s:6:"weight";s:2:"14";s:4:"type";s:26:"text_textarea_with_summary";s:6:"module";s:4:"text";s:6:"active";i:1;s:8:"settings";a:2:{s:4:"rows";s:2:"20";s:12:"summary_rows";i:5;}}s:8:"settings";a:3:{s:15:"text_processing";s:1:"1";s:15:"display_summary";i:0;s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:9;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) ->execute(); $connection->schema()->createTable('field_data_body', array( @@ -5929,7 +6226,7 @@ )) ->execute(); -$connection->schema()->createTable('field_data_field_text_list', array( +$connection->schema()->createTable('field_data_field_text_filtered', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -5946,7 +6243,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -5973,7 +6270,12 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_text_list_value' => array( + 'field_text_filtered_value' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + 'field_text_filtered_format' => array( 'type' => 'varchar', 'not null' => FALSE, 'length' => '255', @@ -5981,55 +6283,1509 @@ ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', - 'language', + 'deleted', 'delta', + 'language', ), - 'mysql_character_set' => 'utf8', -)); - -$connection->insert('field_data_field_text_list') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_text_list_value', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_text_list_value' => 'Some more text', -)) -->execute(); - -$connection->schema()->createTable('field_data_field_user_entityreference', array( - 'fields' => array( + 'indexes' => array( 'entity_type' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '128', - 'default' => '', + 'entity_type', ), 'bundle' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '128', - 'default' => '', + 'bundle', + ), + 'deleted' => array( + 'deleted', + ), + 'entity_id' => array( + 'entity_id', + ), + 'revision_id' => array( + 'revision_id', + ), + 'language' => array( + 'language', + ), + 'field_text_filtered_format' => array( + 'field_text_filtered_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_text_list', 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' => 'normal', + '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_text_list_value' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('field_data_field_text_list') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_text_list_value', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_text_list_value' => 'Some more text', +)) +->execute(); + +$connection->schema()->createTable('field_data_field_text_long_filtered', 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_text_long_filtered_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_long_filtered_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + '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', + ), + 'field_text_long_filtered_format' => array( + 'field_text_long_filtered_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_text_long_plain', 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_text_long_plain_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_long_plain_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + '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', + ), + 'field_text_long_plain_format' => array( + 'field_text_long_plain_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_text_long_plain_filtered', 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_text_long_plain_filtered_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_long_plain_filtered_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + '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', + ), + 'field_text_long_plain_filtered_format' => array( + 'field_text_long_plain_filtered_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_text_plain', 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_text_plain_value' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + 'field_text_plain_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + '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', + ), + 'field_text_plain_format' => array( + 'field_text_plain_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_text_plain_filtered', 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_text_plain_filtered_value' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + 'field_text_plain_filtered_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + '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', + ), + 'field_text_plain_filtered_format' => array( + 'field_text_plain_filtered_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_text_sum_filtered', 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_text_sum_filtered_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_filtered_summary' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_filtered_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + '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', + ), + 'field_text_sum_filtered_format' => array( + 'field_text_sum_filtered_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_text_sum_plain', 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_text_sum_plain_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_plain_summary' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_plain_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + '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', + ), + 'field_text_sum_plain_format' => array( + 'field_text_sum_plain_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_text_sum_plain_filtered', 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_text_sum_plain_filtered_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_plain_filtered_summary' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_plain_filtered_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + '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', + ), + 'field_text_sum_plain_filtered_format' => array( + 'field_text_sum_plain_filtered_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_user_entityreference', 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_user_entityreference_target_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + ), + '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', + ), + 'field_user_entityreference_target_id' => array( + 'field_user_entityreference_target_id', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('field_data_field_user_entityreference') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_user_entityreference_target_id', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_user_entityreference_target_id' => '2', +)) +->execute(); + +$connection->schema()->createTable('field_data_taxonomy_forums', 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' => 'normal', + '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, + ), + 'taxonomy_forums_tid' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_revision_body', 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' => 'normal', + '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, + ), + 'body_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'normal', + ), + 'body_summary' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'normal', + ), + 'body_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('field_revision_body') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'body_value', + 'body_summary', + 'body_format', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '2', + 'revision_id' => '2', + 'language' => 'und', + 'delta' => '0', + 'body_value' => "...is that it's the absolute best show ever. Trust me, I would know.", + 'body_summary' => '', + 'body_format' => 'filtered_html', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '3', + 'revision_id' => '3', + 'language' => 'und', + 'delta' => '0', + 'body_value' => "is - ...is that it's the absolute best show ever. Trust me, I would know.", + 'body_summary' => '', + 'body_format' => 'filtered_html', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '4', + 'revision_id' => '4', + 'language' => 'und', + 'delta' => '0', + 'body_value' => 'is - Is that is it awesome.', + 'body_summary' => '', + 'body_format' => 'filtered_html', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '5', + 'revision_id' => '5', + 'language' => 'und', + 'delta' => '0', + 'body_value' => 'en - Is that is it awesome.', + 'body_summary' => '', + 'body_format' => 'filtered_html', +)) +->execute(); + +$connection->schema()->createTable('field_revision_comment_body', 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' => 'normal', + '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, + ), + 'comment_body_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'normal', + ), + 'comment_body_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('field_revision_comment_body') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'comment_body_value', + 'comment_body_format', +)) +->values(array( + 'entity_type' => 'comment', + 'bundle' => 'comment_node_test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'comment_body_value' => 'This is a comment', + 'comment_body_format' => 'filtered_html', +)) +->execute(); + +$connection->schema()->createTable('field_revision_field_boolean', 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' => 'normal', + '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_boolean_value' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('field_revision_field_boolean') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_boolean_value', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_boolean_value' => '1', +)) +->execute(); + +$connection->schema()->createTable('field_revision_field_date', 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' => 'normal', + '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_date_value' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '100', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('field_revision_field_date') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_date_value', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_date_value' => '2015-01-20 04:15:00', +)) +->execute(); + +$connection->schema()->createTable('field_revision_field_date_with_end_time', 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' => 'normal', + '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_date_with_end_time_value' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + ), + 'field_date_with_end_time_value2' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('field_revision_field_date_with_end_time') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_date_with_end_time_value', + 'field_date_with_end_time_value2', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_date_with_end_time_value' => '1421727300', + 'field_date_with_end_time_value2' => '1421727300', +)) +->execute(); + +$connection->schema()->createTable('field_revision_field_email', 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', + 'size' => 'normal', 'default' => '0', ), 'entity_id' => array( @@ -6040,7 +7796,101 @@ ), '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_email_email' => array( + 'type' => 'varchar', 'not null' => FALSE, + 'length' => '255', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('field_revision_field_email') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_email_email', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_email_email' => 'default@example.com', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '1', + 'field_email_email' => 'another@example.com', +)) +->execute(); + +$connection->schema()->createTable('field_revision_field_file', 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' => 'normal', + '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, ), @@ -6056,47 +7906,138 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_user_entityreference_target_id' => array( + 'field_file_fid' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'field_file_display' => array( 'type' => 'int', 'not null' => TRUE, 'size' => 'normal', + 'default' => '1', 'unsigned' => TRUE, ), + 'field_file_description' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'normal', + ), ), 'primary key' => array( 'entity_type', - 'entity_id', 'deleted', - 'delta', + 'entity_id', + 'revision_id', 'language', + 'delta', ), - 'indexes' => array( + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('field_revision_field_file') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_file_fid', + 'field_file_display', + 'field_file_description', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_file_fid' => '2', + 'field_file_display' => '1', + 'field_file_description' => 'file desc', +)) +->values(array( + 'entity_type' => 'user', + 'bundle' => 'user', + 'deleted' => '0', + 'entity_id' => '2', + 'revision_id' => '2', + 'language' => 'und', + 'delta' => '0', + 'field_file_fid' => '2', + 'field_file_display' => '1', + 'field_file_description' => 'file desc', +)) +->execute(); + +$connection->schema()->createTable('field_revision_field_float', array( + 'fields' => array( 'entity_type' => array( - 'entity_type', + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', ), 'bundle' => array( - 'bundle', + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', ), 'deleted' => array( - 'deleted', + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', ), 'entity_id' => array( - 'entity_id', + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, ), 'revision_id' => array( - 'revision_id', + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, ), 'language' => array( - 'language', + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '32', + 'default' => '', ), - 'field_user_entityreference_target_id' => array( - 'field_user_entityreference_target_id', + 'delta' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, ), + 'field_float_value' => array( + 'type' => 'numeric', + 'not null' => FALSE, + 'precision' => '10', + 'scale' => '0', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_data_field_user_entityreference') +$connection->insert('field_revision_field_float') ->fields(array( 'entity_type', 'bundle', @@ -6105,7 +8046,7 @@ 'revision_id', 'language', 'delta', - 'field_user_entityreference_target_id', + 'field_float_value', )) ->values(array( 'entity_type' => 'node', @@ -6115,11 +8056,11 @@ 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'field_user_entityreference_target_id' => '2', + 'field_float_value' => '1', )) ->execute(); -$connection->schema()->createTable('field_data_taxonomy_forums', array( +$connection->schema()->createTable('field_revision_field_image', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -6146,24 +8087,46 @@ '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_image_fid' => array( 'type' => 'int', 'not null' => FALSE, 'size' => 'normal', 'unsigned' => TRUE, ), - 'language' => array( + 'field_image_alt' => array( 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '32', - 'default' => '', + 'not null' => FALSE, + 'length' => '512', ), - 'delta' => array( + 'field_image_title' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '1024', + ), + 'field_image_width' => array( 'type' => 'int', - 'not null' => TRUE, + 'not null' => FALSE, 'size' => 'normal', 'unsigned' => TRUE, ), - 'taxonomy_forums_tid' => array( + 'field_image_height' => array( 'type' => 'int', 'not null' => FALSE, 'size' => 'normal', @@ -6174,13 +8137,14 @@ 'entity_type', 'deleted', 'entity_id', + 'revision_id', 'language', 'delta', ), 'mysql_character_set' => 'utf8', )); -$connection->schema()->createTable('field_revision_body', array( +$connection->schema()->createTable('field_revision_field_images', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -6224,20 +8188,33 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'body_value' => array( - 'type' => 'text', + 'field_images_fid' => array( + 'type' => 'int', 'not null' => FALSE, 'size' => 'normal', + 'unsigned' => TRUE, ), - 'body_summary' => array( - 'type' => 'text', + 'field_images_alt' => array( + 'type' => 'varchar', 'not null' => FALSE, - 'size' => 'normal', + 'length' => '512', ), - 'body_format' => array( + 'field_images_title' => array( 'type' => 'varchar', 'not null' => FALSE, - 'length' => '255', + 'length' => '1024', + ), + 'field_images_width' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'field_images_height' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, ), ), 'primary key' => array( @@ -6251,7 +8228,7 @@ 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_body') +$connection->insert('field_revision_field_images') ->fields(array( 'entity_type', 'bundle', @@ -6260,61 +8237,29 @@ 'revision_id', 'language', 'delta', - 'body_value', - 'body_summary', - 'body_format', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '2', - 'revision_id' => '2', - 'language' => 'und', - 'delta' => '0', - 'body_value' => "...is that it's the absolute best show ever. Trust me, I would know.", - 'body_summary' => '', - 'body_format' => 'filtered_html', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '3', - 'revision_id' => '3', - 'language' => 'und', - 'delta' => '0', - 'body_value' => "is - ...is that it's the absolute best show ever. Trust me, I would know.", - 'body_summary' => '', - 'body_format' => 'filtered_html', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '4', - 'revision_id' => '4', - 'language' => 'und', - 'delta' => '0', - 'body_value' => 'is - Is that is it awesome.', - 'body_summary' => '', - 'body_format' => 'filtered_html', + 'field_images_fid', + 'field_images_alt', + 'field_images_title', + 'field_images_width', + 'field_images_height', )) ->values(array( 'entity_type' => 'node', - 'bundle' => 'article', + 'bundle' => 'test_content_type', 'deleted' => '0', - 'entity_id' => '5', - 'revision_id' => '5', + 'entity_id' => '1', + 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'body_value' => 'en - Is that is it awesome.', - 'body_summary' => '', - 'body_format' => 'filtered_html', + 'field_images_fid' => '1', + 'field_images_alt' => 'alt text', + 'field_images_title' => 'title text', + 'field_images_width' => '93', + 'field_images_height' => '93', )) ->execute(); -$connection->schema()->createTable('field_revision_comment_body', array( +$connection->schema()->createTable('field_revision_field_integer', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -6358,16 +8303,11 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'comment_body_value' => array( - 'type' => 'text', + 'field_integer_value' => array( + 'type' => 'int', 'not null' => FALSE, 'size' => 'normal', ), - 'comment_body_format' => array( - 'type' => 'varchar', - 'not null' => FALSE, - 'length' => '255', - ), ), 'primary key' => array( 'entity_type', @@ -6380,7 +8320,7 @@ 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_comment_body') +$connection->insert('field_revision_field_integer') ->fields(array( 'entity_type', 'bundle', @@ -6389,23 +8329,41 @@ 'revision_id', 'language', 'delta', - 'comment_body_value', - 'comment_body_format', + 'field_integer_value', )) ->values(array( - 'entity_type' => 'comment', - 'bundle' => 'comment_node_test_content_type', + 'entity_type' => 'node', + 'bundle' => 'test_content_type', 'deleted' => '0', 'entity_id' => '1', 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'comment_body_value' => 'This is a comment', - 'comment_body_format' => 'filtered_html', + 'field_integer_value' => '5', +)) +->values(array( + 'entity_type' => 'user', + 'bundle' => 'user', + 'deleted' => '0', + 'entity_id' => '2', + 'revision_id' => '2', + 'language' => 'und', + 'delta' => '0', + 'field_integer_value' => '99', +)) +->values(array( + 'entity_type' => 'taxonomy_term', + 'bundle' => 'test_vocabulary', + 'deleted' => '0', + 'entity_id' => '4', + 'revision_id' => '4', + 'language' => 'und', + 'delta' => '0', + 'field_integer_value' => '6', )) ->execute(); -$connection->schema()->createTable('field_revision_field_boolean', array( +$connection->schema()->createTable('field_revision_field_integer_list', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -6449,7 +8407,7 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_boolean_value' => array( + 'field_integer_list_value' => array( 'type' => 'int', 'not null' => FALSE, 'size' => 'normal', @@ -6466,7 +8424,7 @@ 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_boolean') +$connection->insert('field_revision_field_integer_list') ->fields(array( 'entity_type', 'bundle', @@ -6475,7 +8433,7 @@ 'revision_id', 'language', 'delta', - 'field_boolean_value', + 'field_integer_list_value', )) ->values(array( 'entity_type' => 'node', @@ -6485,11 +8443,11 @@ 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'field_boolean_value' => '1', + 'field_integer_list_value' => '7', )) ->execute(); -$connection->schema()->createTable('field_revision_field_date', array( +$connection->schema()->createTable('field_revision_field_link', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -6533,10 +8491,20 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_date_value' => array( + 'field_link_url' => array( 'type' => 'varchar', 'not null' => FALSE, - 'length' => '100', + 'length' => '2048', + ), + 'field_link_title' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + 'field_link_attributes' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'normal', ), ), 'primary key' => array( @@ -6550,7 +8518,7 @@ 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_date') +$connection->insert('field_revision_field_link') ->fields(array( 'entity_type', 'bundle', @@ -6559,7 +8527,9 @@ 'revision_id', 'language', 'delta', - 'field_date_value', + 'field_link_url', + 'field_link_title', + 'field_link_attributes', )) ->values(array( 'entity_type' => 'node', @@ -6569,11 +8539,37 @@ 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'field_date_value' => '2015-01-20 04:15:00', + 'field_link_url' => 'http://google.com', + 'field_link_title' => 'Click Here', + 'field_link_attributes' => 'a:1:{s:5:"title";s:10:"Click Here";}', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '2', + 'revision_id' => '2', + 'language' => 'und', + 'delta' => '0', + 'field_link_url' => '', + 'field_link_title' => 'Home', + 'field_link_attributes' => 'a:0:{}', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '3', + 'revision_id' => '3', + 'language' => 'und', + 'delta' => '0', + 'field_link_url' => '', + 'field_link_title' => 'Home', + 'field_link_attributes' => 'a:1:{s:5:"title";s:0:"";}', )) ->execute(); -$connection->schema()->createTable('field_revision_field_date_with_end_time', array( +$connection->schema()->createTable('field_revision_field_long_text', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -6617,54 +8613,34 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_date_with_end_time_value' => array( - 'type' => 'int', + 'field_long_text_value' => array( + 'type' => 'text', 'not null' => FALSE, 'size' => 'normal', ), - 'field_date_with_end_time_value2' => array( - 'type' => 'int', + 'field_long_text_summary' => array( + 'type' => 'text', 'not null' => FALSE, 'size' => 'normal', ), + 'field_long_text_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), ), 'primary key' => array( 'entity_type', 'deleted', 'entity_id', 'revision_id', - 'language', - 'delta', - ), - 'mysql_character_set' => 'utf8', -)); - -$connection->insert('field_revision_field_date_with_end_time') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_date_with_end_time_value', - 'field_date_with_end_time_value2', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_date_with_end_time_value' => '1421727300', - 'field_date_with_end_time_value2' => '1421727300', -)) -->execute(); + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); -$connection->schema()->createTable('field_revision_field_email', array( +$connection->schema()->createTable('field_revision_field_node_entityreference', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -6681,7 +8657,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -6708,24 +8684,48 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_email_email' => array( - 'type' => 'varchar', - 'not null' => FALSE, - 'length' => '255', + 'field_node_entityreference_target_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, ), ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', 'revision_id', - 'language', + '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', + ), + 'field_node_entityreference_target_id' => array( + 'field_node_entityreference_target_id', + ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_email') +$connection->insert('field_revision_field_node_entityreference') ->fields(array( 'entity_type', 'bundle', @@ -6734,7 +8734,7 @@ 'revision_id', 'language', 'delta', - 'field_email_email', + 'field_node_entityreference_target_id', )) ->values(array( 'entity_type' => 'node', @@ -6744,21 +8744,11 @@ 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'field_email_email' => 'default@example.com', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '1', - 'field_email_email' => 'another@example.com', + 'field_node_entityreference_target_id' => '2', )) ->execute(); -$connection->schema()->createTable('field_revision_field_file', array( +$connection->schema()->createTable('field_revision_field_phone', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -6802,23 +8792,10 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_file_fid' => array( - 'type' => 'int', - 'not null' => FALSE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'field_file_display' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'default' => '1', - 'unsigned' => TRUE, - ), - 'field_file_description' => array( - 'type' => 'text', + 'field_phone_value' => array( + 'type' => 'varchar', 'not null' => FALSE, - 'size' => 'normal', + 'length' => '255', ), ), 'primary key' => array( @@ -6832,7 +8809,7 @@ 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_file') +$connection->insert('field_revision_field_phone') ->fields(array( 'entity_type', 'bundle', @@ -6841,9 +8818,7 @@ 'revision_id', 'language', 'delta', - 'field_file_fid', - 'field_file_display', - 'field_file_description', + 'field_phone_value', )) ->values(array( 'entity_type' => 'node', @@ -6853,25 +8828,21 @@ 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'field_file_fid' => '2', - 'field_file_display' => '1', - 'field_file_description' => 'file desc', + 'field_phone_value' => '99-99-99-99', )) ->values(array( - 'entity_type' => 'user', - 'bundle' => 'user', + 'entity_type' => 'node', + 'bundle' => 'test_content_type', 'deleted' => '0', - 'entity_id' => '2', - 'revision_id' => '2', + 'entity_id' => '1', + 'revision_id' => '6', 'language' => 'und', 'delta' => '0', - 'field_file_fid' => '2', - 'field_file_display' => '1', - 'field_file_description' => 'file desc', + 'field_phone_value' => '99-99-99-99', )) ->execute(); -$connection->schema()->createTable('field_revision_field_float', array( +$connection->schema()->createTable('field_revision_field_private_file', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -6888,7 +8859,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -6915,25 +8886,60 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_float_value' => array( - 'type' => 'numeric', + 'field_private_file_fid' => array( + 'type' => 'int', 'not null' => FALSE, - 'precision' => '10', - 'scale' => '0', + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'field_private_file_display' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'tiny', + 'default' => '1', + 'unsigned' => TRUE, + ), + 'field_private_file_description' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'normal', ), ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', 'revision_id', - 'language', + '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', + ), + 'field_private_file_fid' => array( + 'field_private_file_fid', + ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_float') +$connection->insert('field_revision_field_private_file') ->fields(array( 'entity_type', 'bundle', @@ -6942,21 +8948,25 @@ 'revision_id', 'language', 'delta', - 'field_float_value', + 'field_private_file_fid', + 'field_private_file_display', + 'field_private_file_description', )) ->values(array( 'entity_type' => 'node', 'bundle' => 'test_content_type', 'deleted' => '0', 'entity_id' => '1', - 'revision_id' => '1', + 'revision_id' => '6', 'language' => 'und', 'delta' => '0', - 'field_float_value' => '1', + 'field_private_file_fid' => '4', + 'field_private_file_display' => '1', + 'field_private_file_description' => '', )) ->execute(); -$connection->schema()->createTable('field_revision_field_image', array( +$connection->schema()->createTable('field_revision_field_tags', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7000,29 +9010,7 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_image_fid' => array( - 'type' => 'int', - 'not null' => FALSE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'field_image_alt' => array( - 'type' => 'varchar', - 'not null' => FALSE, - 'length' => '512', - ), - 'field_image_title' => array( - 'type' => 'varchar', - 'not null' => FALSE, - 'length' => '1024', - ), - 'field_image_width' => array( - 'type' => 'int', - 'not null' => FALSE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'field_image_height' => array( + 'field_tags_tid' => array( 'type' => 'int', 'not null' => FALSE, 'size' => 'normal', @@ -7040,7 +9028,80 @@ 'mysql_character_set' => 'utf8', )); -$connection->schema()->createTable('field_revision_field_images', array( +$connection->insert('field_revision_field_tags') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_tags_tid', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '2', + 'revision_id' => '2', + 'language' => 'und', + 'delta' => '0', + 'field_tags_tid' => '9', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '3', + 'revision_id' => '3', + 'language' => 'und', + 'delta' => '0', + 'field_tags_tid' => '9', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '2', + 'revision_id' => '2', + 'language' => 'und', + 'delta' => '1', + 'field_tags_tid' => '14', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '3', + 'revision_id' => '3', + 'language' => 'und', + 'delta' => '1', + 'field_tags_tid' => '14', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '2', + 'revision_id' => '2', + 'language' => 'und', + 'delta' => '2', + 'field_tags_tid' => '17', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '3', + 'revision_id' => '3', + 'language' => 'und', + 'delta' => '2', + 'field_tags_tid' => '17', +)) +->execute(); + +$connection->schema()->createTable('field_revision_field_term_entityreference', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7057,7 +9118,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -7084,47 +9145,48 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_images_fid' => array( - 'type' => 'int', - 'not null' => FALSE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'field_images_alt' => array( - 'type' => 'varchar', - 'not null' => FALSE, - 'length' => '512', - ), - 'field_images_title' => array( - 'type' => 'varchar', - 'not null' => FALSE, - 'length' => '1024', - ), - 'field_images_width' => array( - 'type' => 'int', - 'not null' => FALSE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'field_images_height' => array( + 'field_term_entityreference_target_id' => array( 'type' => 'int', - 'not null' => FALSE, + 'not null' => TRUE, 'size' => 'normal', 'unsigned' => TRUE, ), ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', 'revision_id', - 'language', + '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', + ), + 'field_term_entityreference_target_id' => array( + 'field_term_entityreference_target_id', + ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_images') +$connection->insert('field_revision_field_term_entityreference') ->fields(array( 'entity_type', 'bundle', @@ -7133,11 +9195,7 @@ 'revision_id', 'language', 'delta', - 'field_images_fid', - 'field_images_alt', - 'field_images_title', - 'field_images_width', - 'field_images_height', + 'field_term_entityreference_target_id', )) ->values(array( 'entity_type' => 'node', @@ -7147,15 +9205,21 @@ 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'field_images_fid' => '1', - 'field_images_alt' => 'alt text', - 'field_images_title' => 'title text', - 'field_images_width' => '93', - 'field_images_height' => '93', + 'field_term_entityreference_target_id' => '17', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '1', + 'field_term_entityreference_target_id' => '15', )) ->execute(); -$connection->schema()->createTable('field_revision_field_integer', array( +$connection->schema()->createTable('field_revision_field_term_reference', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7199,10 +9263,11 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_integer_value' => array( + 'field_term_reference_tid' => array( 'type' => 'int', 'not null' => FALSE, 'size' => 'normal', + 'unsigned' => TRUE, ), ), 'primary key' => array( @@ -7216,7 +9281,7 @@ 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_integer') +$connection->insert('field_revision_field_term_reference') ->fields(array( 'entity_type', 'bundle', @@ -7225,7 +9290,7 @@ 'revision_id', 'language', 'delta', - 'field_integer_value', + 'field_term_reference_tid', )) ->values(array( 'entity_type' => 'node', @@ -7235,31 +9300,21 @@ 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'field_integer_value' => '5', -)) -->values(array( - 'entity_type' => 'user', - 'bundle' => 'user', - 'deleted' => '0', - 'entity_id' => '2', - 'revision_id' => '2', - 'language' => 'und', - 'delta' => '0', - 'field_integer_value' => '99', + 'field_term_reference_tid' => '4', )) ->values(array( 'entity_type' => 'taxonomy_term', 'bundle' => 'test_vocabulary', 'deleted' => '0', - 'entity_id' => '4', - 'revision_id' => '4', + 'entity_id' => '2', + 'revision_id' => '2', 'language' => 'und', 'delta' => '0', - 'field_integer_value' => '6', + 'field_term_reference_tid' => '3', )) ->execute(); -$connection->schema()->createTable('field_revision_field_integer_list', array( +$connection->schema()->createTable('field_revision_field_text', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7303,10 +9358,15 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_integer_list_value' => array( - 'type' => 'int', + 'field_text_value' => array( + 'type' => 'varchar', 'not null' => FALSE, - 'size' => 'normal', + 'length' => '256', + ), + 'field_text_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', ), ), 'primary key' => array( @@ -7320,7 +9380,7 @@ 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_integer_list') +$connection->insert('field_revision_field_text') ->fields(array( 'entity_type', 'bundle', @@ -7329,7 +9389,8 @@ 'revision_id', 'language', 'delta', - 'field_integer_list_value', + 'field_text_value', + 'field_text_format', )) ->values(array( 'entity_type' => 'node', @@ -7339,11 +9400,12 @@ 'revision_id' => '1', 'language' => 'und', 'delta' => '0', - 'field_integer_list_value' => '7', + 'field_text_value' => 'qwerty', + 'field_text_format' => NULL, )) ->execute(); -$connection->schema()->createTable('field_revision_field_link', array( +$connection->schema()->createTable('field_revision_field_text_filtered', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7360,7 +9422,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -7387,85 +9449,52 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_link_url' => array( + 'field_text_filtered_value' => array( 'type' => 'varchar', 'not null' => FALSE, - 'length' => '2048', + 'length' => '255', ), - 'field_link_title' => array( + 'field_text_filtered_format' => array( 'type' => 'varchar', 'not null' => FALSE, 'length' => '255', ), - 'field_link_attributes' => array( - 'type' => 'text', - 'not null' => FALSE, - 'size' => 'normal', - ), ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', 'revision_id', - 'language', + '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', + ), + 'field_text_filtered_format' => array( + 'field_text_filtered_format', + ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_link') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_link_url', - 'field_link_title', - 'field_link_attributes', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_link_url' => 'http://google.com', - 'field_link_title' => 'Click Here', - 'field_link_attributes' => 'a:1:{s:5:"title";s:10:"Click Here";}', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '2', - 'revision_id' => '2', - 'language' => 'und', - 'delta' => '0', - 'field_link_url' => '', - 'field_link_title' => 'Home', - 'field_link_attributes' => 'a:0:{}', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '3', - 'revision_id' => '3', - 'language' => 'und', - 'delta' => '0', - 'field_link_url' => '', - 'field_link_title' => 'Home', - 'field_link_attributes' => 'a:1:{s:5:"title";s:0:"";}', -)) -->execute(); - -$connection->schema()->createTable('field_revision_field_long_text', array( +$connection->schema()->createTable('field_revision_field_text_list', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7509,17 +9538,7 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_long_text_value' => array( - 'type' => 'text', - 'not null' => FALSE, - 'size' => 'normal', - ), - 'field_long_text_summary' => array( - 'type' => 'text', - 'not null' => FALSE, - 'size' => 'normal', - ), - 'field_long_text_format' => array( + 'field_text_list_value' => array( 'type' => 'varchar', 'not null' => FALSE, 'length' => '255', @@ -7536,7 +9555,30 @@ 'mysql_character_set' => 'utf8', )); -$connection->schema()->createTable('field_revision_field_node_entityreference', array( +$connection->insert('field_revision_field_text_list') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_text_list_value', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_text_list_value' => 'Some more text', +)) +->execute(); + +$connection->schema()->createTable('field_revision_field_text_long_filtered', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7580,11 +9622,15 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_node_entityreference_target_id' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'unsigned' => TRUE, + 'field_text_long_filtered_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_long_filtered_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', ), ), 'primary key' => array( @@ -7614,37 +9660,14 @@ 'language' => array( 'language', ), - 'field_node_entityreference_target_id' => array( - 'field_node_entityreference_target_id', + 'field_text_long_filtered_format' => array( + 'field_text_long_filtered_format', ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_node_entityreference') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_node_entityreference_target_id', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_node_entityreference_target_id' => '2', -)) -->execute(); - -$connection->schema()->createTable('field_revision_field_phone', array( +$connection->schema()->createTable('field_revision_field_text_long_plain', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7661,7 +9684,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -7688,7 +9711,12 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_phone_value' => array( + 'field_text_long_plain_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_long_plain_format' => array( 'type' => 'varchar', 'not null' => FALSE, 'length' => '255', @@ -7696,49 +9724,39 @@ ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', 'revision_id', - 'language', + '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', + ), + 'field_text_long_plain_format' => array( + 'field_text_long_plain_format', + ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_phone') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_phone_value', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_phone_value' => '99-99-99-99', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '6', - 'language' => 'und', - 'delta' => '0', - 'field_phone_value' => '99-99-99-99', -)) -->execute(); - -$connection->schema()->createTable('field_revision_field_private_file', array( +$connection->schema()->createTable('field_revision_field_text_long_plain_filtered', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7782,23 +9800,15 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_private_file_fid' => array( - 'type' => 'int', + 'field_text_long_plain_filtered_value' => array( + 'type' => 'text', 'not null' => FALSE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'field_private_file_display' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'tiny', - 'default' => '1', - 'unsigned' => TRUE, + 'size' => 'big', ), - 'field_private_file_description' => array( - 'type' => 'text', + 'field_text_long_plain_filtered_format' => array( + 'type' => 'varchar', 'not null' => FALSE, - 'size' => 'normal', + 'length' => '255', ), ), 'primary key' => array( @@ -7828,41 +9838,14 @@ 'language' => array( 'language', ), - 'field_private_file_fid' => array( - 'field_private_file_fid', + 'field_text_long_plain_filtered_format' => array( + 'field_text_long_plain_filtered_format', ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_private_file') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_private_file_fid', - 'field_private_file_display', - 'field_private_file_description', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '6', - 'language' => 'und', - 'delta' => '0', - 'field_private_file_fid' => '4', - 'field_private_file_display' => '1', - 'field_private_file_description' => '', -)) -->execute(); - -$connection->schema()->createTable('field_revision_field_tags', array( +$connection->schema()->createTable('field_revision_field_text_plain', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -7879,7 +9862,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -7906,98 +9889,52 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_tags_tid' => array( - 'type' => 'int', + 'field_text_plain_value' => array( + 'type' => 'varchar', 'not null' => FALSE, - 'size' => 'normal', - 'unsigned' => TRUE, + 'length' => '255', + ), + 'field_text_plain_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', ), ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', 'revision_id', - 'language', + 'deleted', 'delta', + 'language', ), - 'mysql_character_set' => 'utf8', -)); - -$connection->insert('field_revision_field_tags') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_tags_tid', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '2', - 'revision_id' => '2', - 'language' => 'und', - 'delta' => '0', - 'field_tags_tid' => '9', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '2', - 'revision_id' => '2', - 'language' => 'und', - 'delta' => '1', - 'field_tags_tid' => '14', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '2', - 'revision_id' => '2', - 'language' => 'und', - 'delta' => '2', - 'field_tags_tid' => '17', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '3', - 'revision_id' => '3', - 'language' => 'und', - 'delta' => '0', - 'field_tags_tid' => '9', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '3', - 'revision_id' => '3', - 'language' => 'und', - 'delta' => '1', - 'field_tags_tid' => '14', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '3', - 'revision_id' => '3', - 'language' => 'und', - 'delta' => '2', - 'field_tags_tid' => '17', -)) -->execute(); + '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', + ), + 'field_text_plain_format' => array( + 'field_text_plain_format', + ), + ), + 'mysql_character_set' => 'utf8', +)); -$connection->schema()->createTable('field_revision_field_term_entityreference', array( +$connection->schema()->createTable('field_revision_field_text_plain_filtered', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -8041,11 +9978,15 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_term_entityreference_target_id' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'unsigned' => TRUE, + 'field_text_plain_filtered_value' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + 'field_text_plain_filtered_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', ), ), 'primary key' => array( @@ -8075,47 +10016,14 @@ 'language' => array( 'language', ), - 'field_term_entityreference_target_id' => array( - 'field_term_entityreference_target_id', + 'field_text_plain_filtered_format' => array( + 'field_text_plain_filtered_format', ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_term_entityreference') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_term_entityreference_target_id', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_term_entityreference_target_id' => '17', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '1', - 'field_term_entityreference_target_id' => '15', -)) -->execute(); - -$connection->schema()->createTable('field_revision_field_term_reference', array( +$connection->schema()->createTable('field_revision_field_text_sum_filtered', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -8132,7 +10040,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -8159,58 +10067,57 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_term_reference_tid' => array( - 'type' => 'int', + 'field_text_sum_filtered_value' => array( + 'type' => 'text', 'not null' => FALSE, - 'size' => 'normal', - 'unsigned' => TRUE, + 'size' => 'big', + ), + 'field_text_sum_filtered_summary' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_filtered_format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', ), ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', 'revision_id', - 'language', + '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', + ), + 'field_text_sum_filtered_format' => array( + 'field_text_sum_filtered_format', + ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_term_reference') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_term_reference_tid', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_term_reference_tid' => '4', -)) -->values(array( - 'entity_type' => 'taxonomy_term', - 'bundle' => 'test_vocabulary', - 'deleted' => '0', - 'entity_id' => '2', - 'revision_id' => '2', - 'language' => 'und', - 'delta' => '0', - 'field_term_reference_tid' => '3', -)) -->execute(); - -$connection->schema()->createTable('field_revision_field_text', array( +$connection->schema()->createTable('field_revision_field_text_sum_plain', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -8227,7 +10134,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -8254,12 +10161,17 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_text_value' => array( - 'type' => 'varchar', + 'field_text_sum_plain_value' => array( + 'type' => 'text', 'not null' => FALSE, - 'length' => '256', + 'size' => 'big', ), - 'field_text_format' => array( + 'field_text_sum_plain_summary' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_plain_format' => array( 'type' => 'varchar', 'not null' => FALSE, 'length' => '255', @@ -8267,41 +10179,39 @@ ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', 'revision_id', - 'language', + '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', + ), + 'field_text_sum_plain_format' => array( + 'field_text_sum_plain_format', + ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_text') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_text_value', - 'field_text_format', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_text_value' => 'qwerty', - 'field_text_format' => NULL, -)) -->execute(); - -$connection->schema()->createTable('field_revision_field_text_list', array( +$connection->schema()->createTable('field_revision_field_text_sum_plain_filtered', array( 'fields' => array( 'entity_type' => array( 'type' => 'varchar', @@ -8318,7 +10228,7 @@ 'deleted' => array( 'type' => 'int', 'not null' => TRUE, - 'size' => 'normal', + 'size' => 'tiny', 'default' => '0', ), 'entity_id' => array( @@ -8345,7 +10255,17 @@ 'size' => 'normal', 'unsigned' => TRUE, ), - 'field_text_list_value' => array( + 'field_text_sum_plain_filtered_value' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_plain_filtered_summary' => array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + ), + 'field_text_sum_plain_filtered_format' => array( 'type' => 'varchar', 'not null' => FALSE, 'length' => '255', @@ -8353,38 +10273,38 @@ ), 'primary key' => array( 'entity_type', - 'deleted', 'entity_id', 'revision_id', - 'language', + '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', + ), + 'field_text_sum_plain_filtered_format' => array( + 'field_text_sum_plain_filtered_format', + ), ), 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_text_list') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_text_list_value', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_text_list_value' => 'Some more text', -)) -->execute(); - $connection->schema()->createTable('field_revision_field_user_entityreference', array( 'fields' => array( 'entity_type' => array( diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php index 248213ad458d8773152ec4f0b026e0a4d666ffe7..71bc7a51d18a13b2063f7ed084c4b029b98f5c8d 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7Test.php @@ -50,8 +50,8 @@ protected function getEntityCounts() { 'configurable_language' => 4, 'contact_form' => 3, 'editor' => 2, - 'field_config' => 53, - 'field_storage_config' => 40, + 'field_config' => 63, + 'field_storage_config' => 45, 'file' => 3, 'filter_format' => 7, 'image_style' => 6, diff --git a/core/modules/text/src/Plugin/migrate/field/d7/TextField.php b/core/modules/text/src/Plugin/migrate/field/d7/TextField.php index 586f1026a1dd8f82abd63f884744eff8d61aab30..c3d24c2119cc753b7a2a357cdd9ae6b08a5e2d59 100644 --- a/core/modules/text/src/Plugin/migrate/field/d7/TextField.php +++ b/core/modules/text/src/Plugin/migrate/field/d7/TextField.php @@ -2,7 +2,9 @@ namespace Drupal\text\Plugin\migrate\field\d7; -use Drupal\text\Plugin\migrate\field\d6\TextField as D6TextField; +use Drupal\migrate\Row; +use Drupal\migrate\MigrateSkipRowException; +use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase; /** * @MigrateField( @@ -15,4 +17,51 @@ * core = {7} * ) */ -class TextField extends D6TextField {} +class TextField extends FieldPluginBase { + + /** + * {@inheritdoc} + */ + public function getFieldType(Row $row) { + $type = $row->getSourceProperty('type'); + $plain_text = FALSE; + $filtered_text = FALSE; + + foreach ($row->getSourceProperty('instances') as $instance) { + // Check if this field has plain text instances, filtered text instances, + // or both. + $data = unserialize($instance['data']); + switch ($data['settings']['text_processing']) { + case '0': + $plain_text = TRUE; + break; + case '1': + $filtered_text = TRUE; + break; + } + } + + if (in_array($type, ['text', 'text_long'])) { + // If a text or text_long field has only plain text instances, migrate it + // to a string or string_long field. + if ($plain_text && !$filtered_text) { + $type = str_replace(['text', 'text_long'], ['string', 'string_long'], $type); + } + // If a text or text_long field has both plain text and filtered text + // instances, skip the row. + elseif ($plain_text && $filtered_text) { + $field_name = $row->getSourceProperty('field_name'); + throw new MigrateSkipRowException("Can't migrate source field $field_name configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text"); + } + } + elseif ($type == 'text_with_summary' && $plain_text) { + // If a text_with_summary field has plain text instances, skip the row + // since there's no such thing as a string_with_summary field. + $field_name = $row->getSourceProperty('field_name'); + throw new MigrateSkipRowException("Can't migrate source field $field_name of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text"); + } + + return $type; + } + +}