Mercurial > hg > isophonics-drupal-site
view core/modules/system/tests/fixtures/update/drupal-8.update-test-postupdate-failing-enabled.php @ 9:1fc0ff908d1f
Add another data file
author | Chris Cannam |
---|---|
date | Mon, 05 Feb 2018 12:34:32 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
<?php /** * @file * Partial database to mimic the installation of the update_test_failing module. */ use Drupal\Core\Database\Database; $connection = Database::getConnection(); // Set the schema version. $connection->merge('key_value') ->condition('collection', 'system.schema') ->condition('name', 'update_test_failing') ->fields([ 'collection' => 'system.schema', 'name' => 'update_test_failing', 'value' => 'i:8000;', ]) ->execute(); // Update core.extension. $extensions = $connection->select('config') ->fields('config', ['data']) ->condition('collection', '') ->condition('name', 'core.extension') ->execute() ->fetchField(); $extensions = unserialize($extensions); $extensions['module']['update_test_failing'] = 8000; $connection->update('config') ->fields([ 'data' => serialize($extensions), ]) ->condition('collection', '') ->condition('name', 'core.extension') ->execute();