Commit 3287afb0 authored by alexpott's avatar alexpott

Issue #2573667 by k4v, YesCT, plach, dawehner, othermachines: Entity...

Issue #2573667 by k4v, YesCT, plach, dawehner, othermachines: Entity uninstallation does not clean up field schema data in state properly
parent a85c80fa
......@@ -367,9 +367,14 @@ public function onEntityTypeDelete(EntityTypeInterface $entity_type) {
$this->originalDefinitions = $field_storage_definitions;
$table_mapping = $this->storage->getTableMapping($field_storage_definitions);
foreach ($field_storage_definitions as $field_storage_definition) {
// If we have a field having dedicated storage we need to drop it,
// otherwise we just remove the related schema data.
if ($table_mapping->requiresDedicatedTableStorage($field_storage_definition)) {
$this->deleteDedicatedTableSchema($field_storage_definition);
}
elseif ($table_mapping->allowsSharedTableStorage($field_storage_definition)) {
$this->deleteFieldSchemaData($field_storage_definition);
}
}
$this->originalDefinitions = NULL;
......
......@@ -139,4 +139,59 @@ public function testModifyingTranslatableColumnSchema() {
}
}
/**
* Tests fields from an uninstalled module are removed from the schema.
*/
public function testCleanUpStorageDefinition() {
// Find all the entity types provided by the entity_test module and install
// the schema for them.
$entity_type_ids = [];
$entities = \Drupal::entityManager()->getDefinitions();
foreach ($entities as $entity_type_id => $definition) {
if ($definition->getProvider() == 'entity_test') {
$this->installEntitySchema($entity_type_id);
$entity_type_ids[] = $entity_type_id;
};
}
// Get a list of all the entities in the schema.
$key_value_store = \Drupal::keyValue('entity.storage_schema.sql');
$schema = $key_value_store->getAll();
// Count the storage definitions provided by the entity_test module, so that
// after uninstall we can be sure there were some to be deleted.
$entity_type_id_count = 0;
foreach (array_keys($schema) as $storage_definition_name) {
list($entity_type_id, ,) = explode('.', $storage_definition_name);
if (in_array($entity_type_id, $entity_type_ids)) {
$entity_type_id_count++;
}
}
// Ensure that there are storage definitions from the entity_test module.
$this->assertNotEqual($entity_type_id_count, 0, 'There are storage definitions provided by the entity_test module in the schema.');
// Uninstall the entity_test module.
$this->container->get('module_installer')->uninstall(array('entity_test'));
// Get a list of all the entities in the schema.
$key_value_store = \Drupal::keyValue('entity.storage_schema.sql');
$schema = $key_value_store->getAll();
// Count the storage definitions that come from entity types provided by
// the entity_test module.
$entity_type_id_count = 0;
foreach (array_keys($schema) as $storage_definition_name) {
list($entity_type_id, ,) = explode('.', $storage_definition_name);
if (in_array($entity_type_id, $entity_type_ids)) {
$entity_type_id_count++;
}
}
// Ensure that all storage definitions have been removed from the schema.
$this->assertEqual($entity_type_id_count, 0, 'After uninstalling entity_test module the schema should not contains fields from entities provided by the module.');
}
}
<?php
/**
* @file
* Contains \Drupal\system\Tests\Update\FieldSchemaDataUninstallUpdateTest.
*/
namespace Drupal\system\Tests\Update;
/**
* Tests the upgrade path after fixing field schema data uninstallation.
*
* @see https://www.drupal.org/node/2573667
*
* @group Update
*/
class FieldSchemaDataUninstallUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
__DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.block-content-uninstall.php',
__DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.field-schema-data-uninstall-2573667.php',
];
}
/**
* Tests the upgrade path after fixing field schema data uninstallation.
*/
public function testUpdateHookN() {
$this->assertFieldSchemaData(TRUE, 'Field schema data to be purged found before update.');
$this->runUpdates();
$this->assertFieldSchemaData(FALSE, 'No field schema data to be purged found after update.');
}
/**
* Asserts that field schema data to be purged is found.
*
* @param bool $found
* Whether field schema data is expected to be found or not.
* @param string $message
* The assert message.
*
* @return bool
* TRUE if the assertion succeeded, FALSE otherwise.
*/
protected function assertFieldSchemaData($found, $message) {
$query = \Drupal::database()
->select('key_value', 'kv')
->fields('kv');
$query
->condition('kv.collection', 'entity.storage_schema.sql')
->condition('kv.name', 'block_content.field_schema_data.%', 'LIKE');
$items = $query
->execute()
->fetchAll();
return $this->assertEqual((bool) $items, $found, $message);
}
}
......@@ -1593,10 +1593,15 @@ function _system_update_create_block($name, $theme_name, array $values) {
function system_update_8007() {
$database = \Drupal::database();
$database_schema = $database->schema();
$entity_types = \Drupal::entityManager()->getDefinitions();
$schema = \Drupal::keyValue('entity.storage_schema.sql')->getAll();
$schema_copy = $schema;
foreach ($schema as $item_name => $item) {
list($entity_type_id, , ) = explode('.', $item_name);
if (!isset($entity_types[$entity_type_id])) {
continue;
}
foreach ($item as $table_name => $table_schema) {
foreach ($table_schema as $schema_key => $schema_data) {
if ($schema_key == 'fields') {
......@@ -1642,6 +1647,21 @@ function system_update_8007() {
\Drupal::keyValue('entity.definitions.installed')->setMultiple($definitions_copy);
}
/**
* Purge field schema data for uninstalled entity types.
*/
function system_update_8008() {
$entity_types = \Drupal::entityManager()->getDefinitions();
/** @var \Drupal\Core\KeyValueStore\KeyValueStoreInterface $schema */
$schema = \Drupal::keyValue('entity.storage_schema.sql');
foreach ($schema->getAll() as $key => $item) {
list($entity_type_id, ,) = explode('.', $key);
if (!isset($entity_types[$entity_type_id])) {
$schema->delete($key);
}
}
}
/**
* @} End of "addtogroup updates-8.0.0-beta".
*/
<?php
/**
* @file
* Partial database to mimic the uninstallation of the block_content module.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$connection->schema()->dropTable('block_content');
$connection->schema()->dropTable('block_content__body');
$connection->schema()->dropTable('block_content_field_data');
$connection->schema()->dropTable('block_content_field_revision');
$connection->schema()->dropTable('block_content_revision');
$connection->schema()->dropTable('block_content_revision__body');
$connection->update('config')
->condition('collection', '')
->condition('name', 'core.extension')
->fields(['data' => 'a:2:{s:6:"module";a:39:{s:5:"block";i:0;s:10:"breakpoint";i:0;s:8:"ckeditor";i:0;s:5:"color";i:0;s:7:"comment";i:0;s:6:"config";i:0;s:7:"contact";i:0;s:10:"contextual";i:0;s:8:"datetime";i:0;s:5:"dblog";i:0;s:6:"editor";i:0;s:16:"entity_reference";i:0;s:5:"field";i:0;s:8:"field_ui";i:0;s:4:"file";i:0;s:6:"filter";i:0;s:4:"help";i:0;s:7:"history";i:0;s:5:"image";i:0;s:4:"link";i:0;s:7:"menu_ui";i:0;s:4:"node";i:0;s:7:"options";i:0;s:10:"page_cache";i:0;s:4:"path";i:0;s:9:"quickedit";i:0;s:3:"rdf";i:0;s:6:"search";i:0;s:8:"shortcut";i:0;s:6:"system";i:0;s:8:"taxonomy";i:0;s:4:"text";i:0;s:7:"toolbar";i:0;s:4:"tour";i:0;s:4:"user";i:0;s:8:"views_ui";i:0;s:17:"menu_link_content";i:1;s:5:"views";i:10;s:8:"standard";i:1000;}s:5:"theme";a:3:{s:6:"classy";i:0;s:6:"bartik";i:0;s:5:"seven";i:0;}}'])
->execute();
$connection->delete('config')
->condition('name', 'block_content.type.basic')
->execute();
$connection->delete('config')
->condition('name', 'core.entity_form_display.block_content.basic.default')
->execute();
$connection->delete('config')
->condition('name', 'core.entity_view_display.block_content.basic.default')
->execute();
$connection->delete('config')
->condition('name', 'core.entity_view_mode.block_content.full')
->execute();
$connection->delete('config')
->condition('name', 'field.field.block_content.basic.body')
->execute();
$connection->delete('config')
->condition('name', 'field.storage.block_content.body')
->execute();
$connection->delete('config')
->condition('name', 'views.view.block_content')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.block_content_type')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.entity_form_display')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.entity_view_display')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.entity_view_mode')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.field_config')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.field_storage_config')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.view')
->condition('value', '%.block_content"%', 'LIKE')
->execute();
$connection->update('key_value')
->condition('collection', 'entity.definitions.bundle_field_map')
->condition('name', 'block_content')
->fields(['value' => 'a:0:{}'])
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.definitions.installed')
->condition('name', 'block_content.entity_type')
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.definitions.installed')
->condition('name', 'block_content.field_storage_definitions')
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.definitions.installed')
->condition('name', 'block_content_type.entity_type')
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.storage_schema.sql')
->condition('name', 'block_content.entity_schema_data')
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.storage_schema.sql')
->condition('name', 'block_content.field_schema_data.%', 'LIKE')
->execute();
$connection->update('key_value')
->condition('collection', 'state')
->condition('name', 'router.path_roots')
->fields(['value' => 'a:27:{i:0;s:5:"admin";i:1;s:14:"block-category";i:2;s:7:"comment";i:3;s:8:"comments";i:4;s:7:"contact";i:5;s:4:"user";i:6;s:10:"contextual";i:7;s:6:"editor";i:8;s:4:"file";i:9;s:6:"filter";i:10;s:7:"history";i:11;s:5:"sites";i:12;s:6:"system";i:13;s:4:"node";i:14;s:9:"quickedit";i:15;s:6:"search";i:16;s:4:"cron";i:17;s:12:"machine_name";i:18;s:0:"";i:19;s:9:"<current>";i:20;s:5:"batch";i:21;s:10:"update.php";i:22;s:29:"entity_reference_autocomplete";i:23;s:8:"taxonomy";i:24;s:7:"toolbar";i:25;s:7:"rss.xml";i:26;s:5:"views";}'])
->execute();
$connection->update('key_value')
->condition('collection', 'state')
->condition('name', 'routing.non_admin_routes')
->fields(['value' => 'a:79:{i:0;s:27:"block.category_autocomplete";i:1;s:24:"entity.comment.edit_form";i:2;s:15:"comment.approve";i:3;s:24:"entity.comment.canonical";i:4;s:26:"entity.comment.delete_form";i:5;s:13:"comment.reply";i:6;s:31:"comment.new_comments_node_links";i:7;s:21:"comment.node_redirect";i:8;s:17:"contact.site_page";i:9;s:22:"contact.site_page_form";i:10;s:24:"entity.user.contact_form";i:11;s:17:"contextual.render";i:12;s:17:"editor.filter_xss";i:13;s:31:"editor.field_untransformed_text";i:14;s:19:"editor.image_dialog";i:15;s:18:"editor.link_dialog";i:16;s:18:"file.ajax_progress";i:17;s:15:"filter.tips_all";i:18;s:11:"filter.tips";i:19;s:26:"history.get_last_node_view";i:20;s:17:"history.read_node";i:21;s:18:"image.style_public";i:22;s:19:"image.style_private";i:23;s:13:"node.add_page";i:24;s:8:"node.add";i:25;s:19:"entity.node.preview";i:26;s:27:"entity.node.version_history";i:27;s:20:"entity.node.revision";i:28;s:28:"node.revision_revert_confirm";i:29;s:28:"node.revision_delete_confirm";i:30;s:18:"quickedit.metadata";i:31;s:21:"quickedit.attachments";i:32;s:20:"quickedit.field_form";i:33;s:21:"quickedit.entity_save";i:34;s:11:"search.view";i:35;s:23:"search.view_node_search";i:36;s:23:"search.help_node_search";i:37;s:23:"search.view_user_search";i:38;s:23:"search.help_user_search";i:39;s:19:"shortcut.set_switch";i:40;s:11:"system.ajax";i:41;s:10:"system.401";i:42;s:10:"system.403";i:43;s:10:"system.404";i:44;s:11:"system.cron";i:45;s:33:"system.machine_name_transliterate";i:46;s:12:"system.files";i:47;s:28:"system.private_file_download";i:48;s:16:"system.temporary";i:49;s:7:"<front>";i:50;s:6:"<none>";i:51;s:9:"<current>";i:52;s:15:"system.timezone";i:53;s:22:"system.batch_page.html";i:54;s:22:"system.batch_page.json";i:55;s:16:"system.db_update";i:56;s:26:"system.entity_autocomplete";i:57;s:30:"entity.taxonomy_term.edit_form";i:58;s:32:"entity.taxonomy_term.delete_form";i:59;s:16:"toolbar.subtrees";i:60;s:13:"user.register";i:61;s:11:"user.logout";i:62;s:9:"user.pass";i:63;s:9:"user.page";i:64;s:10:"user.login";i:65;s:19:"user.cancel_confirm";i:66;s:10:"user.reset";i:67;s:21:"view.frontpage.feed_1";i:68;s:21:"view.frontpage.page_1";i:69;s:25:"view.taxonomy_term.feed_1";i:70;s:25:"view.taxonomy_term.page_1";i:71;s:10:"views.ajax";i:72;s:21:"entity.node.canonical";i:73;s:23:"entity.node.delete_form";i:74;s:21:"entity.node.edit_form";i:75;s:21:"entity.user.canonical";i:76;s:21:"entity.user.edit_form";i:77;s:23:"entity.user.cancel_form";i:78;s:30:"entity.taxonomy_term.canonical";}'])
->execute();
$connection->update('key_value')
->condition('collection', 'state')
->condition('name', 'views.view_route_names')
->fields(['value' => 'a:8:{s:24:"user_admin_people.page_1";s:22:"entity.user.collection";s:20:"taxonomy_term.page_1";s:30:"entity.taxonomy_term.canonical";s:14:"content.page_1";s:20:"system.admin_content";s:12:"files.page_1";s:17:"view.files.page_1";s:12:"files.page_2";s:17:"view.files.page_2";s:16:"frontpage.feed_1";s:21:"view.frontpage.feed_1";s:16:"frontpage.page_1";s:21:"view.frontpage.page_1";s:20:"taxonomy_term.feed_1";s:25:"view.taxonomy_term.feed_1";}'])
->execute();
$connection->delete('key_value')
->condition('collection', 'system.schema')
->condition('name', 'block_content')
->execute();
$connection->delete('router')
->condition('name', 'block_content.%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'entity.block_content.%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'entity.entity_form_display.block_content.%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'entity.entity_view_display.block_content.%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'entity.field_config.block_content_%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'field_ui.field_storage_config_add_block_content')
->execute();
$connection->delete('router')
->condition('name', 'view.block_content.page_1')
->execute();
$connection->delete('router')
->condition('name', 'entity.block_content_type.collection')
->execute();
$connection->delete('router')
->condition('name', 'entity.block_content_type.%', 'LIKE')
->execute();
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2573667.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$connection->insert('key_value')
->fields(array(
'collection',
'name',
'value',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.body',
'value' => 'a:2:{s:19:"block_content__body";a:4:{s:11:"description";s:42:"Data storage for block_content field body.";s:6:"fields";a:9:{s:6:"bundle";a:5:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:128;s:8:"not null";b:1;s:7:"default";s:0:"";s:11:"description";s:88:"The field instance bundle to which this row belongs, used when deleting a field instance";}s:7:"deleted";a:5:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:1;s:7:"default";i:0;s:11:"description";s:60:"A boolean indicating whether this data item has been deleted";}s:9:"entity_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:38:"The entity id this data is attached to";}s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:47:"The entity revision id this data is attached to";}s:8:"langcode";a:5:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:32;s:8:"not null";b:1;s:7:"default";s:0:"";s:11:"description";s:37:"The language code for this data item.";}s:5:"delta";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:67:"The sequence number for this data item, used for multi-value fields";}s:10:"body_value";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:1;}s:12:"body_summary";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:0;}s:11:"body_format";a:3:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:255;s:8:"not null";b:0;}}s:11:"primary key";a:4:{i:0;s:9:"entity_id";i:1;s:7:"deleted";i:2;s:5:"delta";i:3;s:8:"langcode";}s:7:"indexes";a:3:{s:6:"bundle";a:1:{i:0;s:6:"bundle";}s:11:"revision_id";a:1:{i:0;s:11:"revision_id";}s:11:"body_format";a:1:{i:0;s:11:"body_format";}}}s:28:"block_content_revision__body";a:4:{s:11:"description";s:54:"Revision archive storage for block_content field body.";s:6:"fields";a:9:{s:6:"bundle";a:5:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:128;s:8:"not null";b:1;s:7:"default";s:0:"";s:11:"description";s:88:"The field instance bundle to which this row belongs, used when deleting a field instance";}s:7:"deleted";a:5:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:1;s:7:"default";i:0;s:11:"description";s:60:"A boolean indicating whether this data item has been deleted";}s:9:"entity_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:38:"The entity id this data is attached to";}s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:47:"The entity revision id this data is attached to";}s:8:"langcode";a:5:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:32;s:8:"not null";b:1;s:7:"default";s:0:"";s:11:"description";s:37:"The language code for this data item.";}s:5:"delta";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:67:"The sequence number for this data item, used for multi-value fields";}s:10:"body_value";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:1;}s:12:"body_summary";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:0;}s:11:"body_format";a:3:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:255;s:8:"not null";b:0;}}s:11:"primary key";a:5:{i:0;s:9:"entity_id";i:1;s:11:"revision_id";i:2;s:7:"deleted";i:3;s:5:"delta";i:4;s:8:"langcode";}s:7:"indexes";a:3:{s:6:"bundle";a:1:{i:0;s:6:"bundle";}s:11:"revision_id";a:1:{i:0;s:11:"revision_id";}s:11:"body_format";a:1:{i:0;s:11:"body_format";}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.changed',
'value' => 'a:2:{s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:7:"changed";a:2:{s:4:"type";s:3:"int";s:8:"not null";b:0;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:7:"changed";a:2:{s:4:"type";s:3:"int";s:8:"not null";b:0;}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.default_langcode',
'value' => 'a:2:{s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:16:"default_langcode";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:1;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:16:"default_langcode";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:1;}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.id',
'value' => 'a:4:{s:13:"block_content";a:1:{s:6:"fields";a:1:{s:2:"id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:2:"id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:22:"block_content_revision";a:1:{s:6:"fields";a:1:{s:2:"id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:2:"id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.info',
'value' => 'a:2:{s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:4:"info";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:255;s:6:"binary";b:0;s:8:"not null";b:0;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:4:"info";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:255;s:6:"binary";b:0;s:8:"not null";b:0;}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.langcode',
'value' => 'a:4:{s:13:"block_content";a:1:{s:6:"fields";a:1:{s:8:"langcode";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:12;s:8:"is_ascii";b:1;s:8:"not null";b:1;}}}s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:8:"langcode";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:12;s:8:"is_ascii";b:1;s:8:"not null";b:1;}}}s:22:"block_content_revision";a:1:{s:6:"fields";a:1:{s:8:"langcode";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:12;s:8:"is_ascii";b:1;s:8:"not null";b:1;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:8:"langcode";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:12;s:8:"is_ascii";b:1;s:8:"not null";b:1;}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.revision_id',
'value' => 'a:4:{s:13:"block_content";a:1:{s:6:"fields";a:1:{s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:0;}}}s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:22:"block_content_revision";a:1:{s:6:"fields";a:1:{s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.revision_log',
'value' => 'a:1:{s:22:"block_content_revision";a:1:{s:6:"fields";a:1:{s:12:"revision_log";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:0;}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.revision_translation_affected',
'value' => 'a:2:{s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:29:"revision_translation_affected";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:0;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:29:"revision_translation_affected";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:0;}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.type',
'value' => 'a:2:{s:13:"block_content";a:2:{s:6:"fields";a:1:{s:4:"type";a:4:{s:11:"description";s:28:"The ID of the target entity.";s:4:"type";s:13:"varchar_ascii";s:6:"length";i:32;s:8:"not null";b:1;}}s:7:"indexes";a:1:{s:36:"block_content_field__type__target_id";a:1:{i:0;s:4:"type";}}}s:24:"block_content_field_data";a:2:{s:6:"fields";a:1:{s:4:"type";a:4:{s:11:"description";s:28:"The ID of the target entity.";s:4:"type";s:13:"varchar_ascii";s:6:"length";i:32;s:8:"not null";b:1;}}s:7:"indexes";a:1:{s:36:"block_content_field__type__target_id";a:1:{i:0;s:4:"type";}}}}',
))
->values(array(
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.uuid',
'value' => 'a:1:{s:13:"block_content";a:2:{s:6:"fields";a:1:{s:4:"uuid";a:4:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:128;s:6:"binary";b:0;s:8:"not null";b:1;}}s:11:"unique keys";a:1:{s:32:"block_content_field__uuid__value";a:1:{i:0;s:4:"uuid";}}}}',
))
->execute();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment