Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / fixtures / update / drupal-8.entity-test-schema-converter-enabled.php
diff --git a/web/core/modules/system/tests/fixtures/update/drupal-8.entity-test-schema-converter-enabled.php b/web/core/modules/system/tests/fixtures/update/drupal-8.entity-test-schema-converter-enabled.php
new file mode 100644 (file)
index 0000000..3a5bc18
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+// @codingStandardsIgnoreFile
+
+use Drupal\Core\Database\Database;
+
+$connection = Database::getConnection();
+
+// Set the schema version.
+$connection->merge('key_value')
+  ->fields([
+    'value' => 'i:8000;',
+    'name' => 'entity_test_schema_converter',
+    'collection' => 'system.schema',
+  ])
+  ->condition('collection', 'system.schema')
+  ->condition('name', 'entity_test_schema_converter')
+  ->execute();
+
+// Update core.extension.
+$extensions = $connection->select('config')
+  ->fields('config', ['data'])
+  ->condition('collection', '')
+  ->condition('name', 'core.extension')
+  ->execute()
+  ->fetchField();
+$extensions = unserialize($extensions);
+$extensions['module']['entity_test_schema_converter'] = 8000;
+$connection->update('config')
+  ->fields([
+    'data' => serialize($extensions),
+    'collection' => '',
+    'name' => 'core.extension',
+  ])
+  ->condition('collection', '')
+  ->condition('name', 'core.extension')
+  ->execute();