Commit ffde2454 authored by alexpott's avatar alexpott

Issue #2500533 by quietone, phenaproxima: Upgrade path for System 7.x

parent 0fe04b15
id: d6_action_settings id: action_settings
label: Action configuration label: Action configuration
migration_tags: migration_tags:
- Drupal 6 - Drupal 6
- Drupal 7
source: source:
plugin: variable plugin: variable
variables: variables:
......
...@@ -24,7 +24,7 @@ class MigrateActionConfigsTest extends MigrateDrupal6TestBase { ...@@ -24,7 +24,7 @@ class MigrateActionConfigsTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->executeMigration('d6_action_settings'); $this->executeMigration('action_settings');
} }
/** /**
......
<?php
namespace Drupal\Tests\action\Kernel\Migrate\d7;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Upgrade variables to action.settings.yml.
*
* @group migrate_drupal_7
*/
class MigrateActionConfigsTest extends MigrateDrupal7TestBase {
use SchemaCheckTestTrait;
/**
* {@inheritdoc}
*/
public static $modules = ['action'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->executeMigration('action_settings');
}
/**
* Tests migration of action variables to action.settings.yml.
*/
public function testActionSettings() {
$config = $this->config('action.settings');
$this->assertSame(28, $config->get('recursion_limit'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'action.settings', $config->get());
}
}
id: d6_file_settings id: file_settings
label: File configuration label: File configuration
migration_tags: migration_tags:
- Drupal 6 - Drupal 6
- Drupal 7
source: source:
plugin: variable plugin: variable
variables: variables:
......
...@@ -19,7 +19,7 @@ class MigrateFileConfigsTest extends MigrateDrupal6TestBase { ...@@ -19,7 +19,7 @@ class MigrateFileConfigsTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->executeMigration('d6_file_settings'); $this->executeMigration('file_settings');
} }
/** /**
......
<?php
namespace Drupal\Tests\file\Kernel\Migrate\d7;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Upgrade variables to file.settings.yml.
*
* @group migrate_drupal_7
*/
class MigrateFileConfigsTest extends MigrateDrupal7TestBase {
use SchemaCheckTestTrait;
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->executeMigration('file_settings');
}
/**
* Tests migration of file variables to file.settings.yml.
*/
public function testFileSettings() {
$config = $this->config('file.settings');
$this->assertSame('textfield', $config->get('description.type'));
$this->assertSame(256, $config->get('description.length'));
$this->assertSame('sites/default/files/icons', $config->get('icon.directory'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'file.settings', $config->get());
}
}
...@@ -41082,6 +41082,10 @@ ...@@ -41082,6 +41082,10 @@
'name', 'name',
'value', 'value',
)) ))
->values(array(
'name' => 'actions_max_stack',
'value' => 'i:28;',
))
->values(array( ->values(array(
'name' => 'additional_settings__active_tab_article', 'name' => 'additional_settings__active_tab_article',
'value' => 's:15:"edit-submission";', 'value' => 's:15:"edit-submission";',
...@@ -41106,6 +41110,10 @@ ...@@ -41106,6 +41110,10 @@
'name' => 'additional_settings__active_tab_test_content_type', 'name' => 'additional_settings__active_tab_test_content_type',
'value' => 's:13:"edit-workflow";', 'value' => 's:13:"edit-workflow";',
)) ))
->values(array(
'name' => 'admin_compact_mode',
'value' => 'b:1;',
))
->values(array( ->values(array(
'name' => 'admin_theme', 'name' => 'admin_theme',
'value' => 's:5:"seven";', 'value' => 's:5:"seven";',
...@@ -41142,10 +41150,18 @@ ...@@ -41142,10 +41150,18 @@
'name' => 'allow_insecure_derivatives', 'name' => 'allow_insecure_derivatives',
'value' => 'b:1;', 'value' => 'b:1;',
)) ))
->values(array(
'name' => 'allow_insecure_uploads',
'value' => 'i:1;',
))
->values(array( ->values(array(
'name' => 'anonymous', 'name' => 'anonymous',
'value' => 's:9:"Anonymous";', 'value' => 's:9:"Anonymous";',
)) ))
->values(array(
'name' => 'authorize_filetransfer_default',
'value' => 's:3:"ftp";',
))
->values(array( ->values(array(
'name' => 'block_cache', 'name' => 'block_cache',
'value' => 'i:0;', 'value' => 'i:0;',
...@@ -41158,6 +41174,10 @@ ...@@ -41158,6 +41174,10 @@
'name' => 'book_child_type', 'name' => 'book_child_type',
'value' => 's:4:"book";', 'value' => 's:4:"book";',
)) ))
->values(array(
'name' => 'cache',
'value' => 'i:0;',
))
->values(array( ->values(array(
'name' => 'cache_flush_cache', 'name' => 'cache_flush_cache',
'value' => 'i:0;', 'value' => 'i:0;',
...@@ -41370,6 +41390,10 @@ ...@@ -41370,6 +41390,10 @@
'name' => 'comment_test_content_type', 'name' => 'comment_test_content_type',
'value' => 's:1:"2";', 'value' => 's:1:"2";',
)) ))
->values(array(
'name' => 'configurable_timezones',
'value' => 'b:1;',
))
->values(array( ->values(array(
'name' => 'contact_default_status', 'name' => 'contact_default_status',
'value' => 'i:1;', 'value' => 'i:1;',
...@@ -41390,6 +41414,14 @@ ...@@ -41390,6 +41414,14 @@
'name' => 'cron_last', 'name' => 'cron_last',
'value' => 'i:1444944970;', 'value' => 'i:1444944970;',
)) ))
->values(array(
'name' => 'cron_threshold_error',
'value' => 'i:1209600;',
))
->values(array(
'name' => 'cron_threshold_warning',
'value' => 'i:172800;',
))
->values(array( ->values(array(
'name' => 'css_js_query_string', 'name' => 'css_js_query_string',
'value' => 's:6:"nwa6nq";', 'value' => 's:6:"nwa6nq";',
...@@ -41410,6 +41442,10 @@ ...@@ -41410,6 +41442,10 @@
'name' => 'date_default_timezone', 'name' => 'date_default_timezone',
'value' => 's:15:"America/Chicago";', 'value' => 's:15:"America/Chicago";',
)) ))
->values(array(
'name' => 'date_first_day',
'value' => 'i:1;',
))
->values(array( ->values(array(
'name' => 'dblog_row_limit', 'name' => 'dblog_row_limit',
'value' => 'i:10000;', 'value' => 'i:10000;',
...@@ -41430,10 +41466,30 @@ ...@@ -41430,10 +41466,30 @@
'name' => 'drupal_private_key', 'name' => 'drupal_private_key',
'value' => 's:43:"9eRJWxrMwQ5CufYJjXBZbPGz_t8vPIYRQr18PamdKmM";', 'value' => 's:43:"9eRJWxrMwQ5CufYJjXBZbPGz_t8vPIYRQr18PamdKmM";',
)) ))
->values(array(
'name' => 'drupal_weight_select_max',
'value' => 'i:40;',
))
->values(array( ->values(array(
'name' => 'email__active_tab', 'name' => 'email__active_tab',
'value' => 's:27:"edit-email-pending-approval";', 'value' => 's:27:"edit-email-pending-approval";',
)) ))
->values(array(
'name' => 'empty_timezone_message',
'value' => 'b:1;',
))
->values(array(
'name' => 'error_level',
'value' => 'i:1;',
))
->values(array(
'name' => 'feed_default_items',
'value' => 'i:27;',
))
->values(array(
'name' => 'feed_item_length',
'value' => 's:8:"fulltext";',
))
->values(array( ->values(array(
'name' => 'field_bundle_settings_comment__comment_node_test_content_type', 'name' => 'field_bundle_settings_comment__comment_node_test_content_type',
'value' => 'a:2:{s:10:"view_modes";a:0:{}s:12:"extra_fields";a:2:{s:4:"form";a:2:{s:6:"author";a:1:{s:6:"weight";s:2:"-2";}s:7:"subject";a:1:{s:6:"weight";s:2:"-1";}}s:7:"display";a:0:{}}}', 'value' => 'a:2:{s:10:"view_modes";a:0:{}s:12:"extra_fields";a:2:{s:4:"form";a:2:{s:6:"author";a:1:{s:6:"weight";s:2:"-2";}s:7:"subject";a:1:{s:6:"weight";s:2:"-1";}}s:7:"display";a:0:{}}}',
...@@ -41450,6 +41506,22 @@ ...@@ -41450,6 +41506,22 @@
'name' => 'file_default_scheme', 'name' => 'file_default_scheme',
'value' => 's:6:"public";', 'value' => 's:6:"public";',
)) ))
->values(array(
'name' => 'file_description_length',
'value' => 'i:256;',
))
->values(array(
'name' => 'file_description_type',
'value' => 's:9:"textfield";',
))
->values(array(
'name' => 'file_directory_path',
'value' => 's:19:"sites/default/files";',
))
->values(array(
'name' => 'file_icon_directory',
'value' => 's:25:"sites/default/files/icons";',
))
->values(array( ->values(array(
'name' => 'file_private_path', 'name' => 'file_private_path',
'value' => 's:0:"";', 'value' => 's:0:"";',
...@@ -41494,10 +41566,18 @@ ...@@ -41494,10 +41566,18 @@
'name' => 'forum_per_page', 'name' => 'forum_per_page',
'value' => 'i:25;', 'value' => 'i:25;',
)) ))
->values(array(
'name' => 'image_jpeg_quality',
'value' => 'i:80;',
))
->values(array( ->values(array(
'name' => 'image_style_preview_image', 'name' => 'image_style_preview_image',
'value' => 's:33:"core/modules/image/testsample.png";', 'value' => 's:33:"core/modules/image/testsample.png";',
)) ))
->values(array(
'name' => 'image_toolkit',
'value' => 's:2:"gd";',
))
->values(array( ->values(array(
'name' => 'install_profile', 'name' => 'install_profile',
'value' => 's:8:"standard";', 'value' => 's:8:"standard";',
...@@ -41574,6 +41654,10 @@ ...@@ -41574,6 +41654,10 @@
'name' => 'locale_language_negotiation_url_part', 'name' => 'locale_language_negotiation_url_part',
'value' => 's:6:"domain";', 'value' => 's:6:"domain";',
)) ))
->values(array(
'name' => 'mail_system',
'value' => 'a:1:{s:14:"default-system";s:17:"DefaultMailSystem";}',
))
->values(array( ->values(array(
'name' => 'maintenance_mode', 'name' => 'maintenance_mode',
'value' => 'i:0;', 'value' => 'i:0;',
...@@ -41838,6 +41922,10 @@ ...@@ -41838,6 +41922,10 @@
'name' => 'site_name', 'name' => 'site_name',
'value' => 's:13:"The Site Name";', 'value' => 's:13:"The Site Name";',
)) ))
->values(array(
'name' => 'site_offline_message',
'value' => 's:42:"This is a custom maintenance mode message.";',
))
->values(array( ->values(array(
'name' => 'site_slogan', 'name' => 'site_slogan',
'value' => 's:10:"The Slogan";', 'value' => 's:10:"The Slogan";',
...@@ -41878,6 +41966,14 @@ ...@@ -41878,6 +41966,14 @@
'name' => 'syslog_identity', 'name' => 'syslog_identity',
'value' => 's:6:"drupal";', 'value' => 's:6:"drupal";',
)) ))
->values(array(
'name' => 'taxonomy_override_selector',
'value' => 'b:1;',
))
->values(array(
'name' => 'taxonomy_terms_per_page_admin',
'value' => 'i:84;',
))
->values(array( ->values(array(
'name' => 'teaser_length', 'name' => 'teaser_length',
'value' => 'i:1024;', 'value' => 'i:1024;',
...@@ -41922,6 +42018,10 @@ ...@@ -41922,6 +42018,10 @@
'name' => 'user_cancel_method', 'name' => 'user_cancel_method',
'value' => 's:17:"user_cancel_block";', 'value' => 's:17:"user_cancel_block";',
)) ))
->values(array(
'name' => 'user_default_timezone',
'value' => 'i:2;',
))
->values(array( ->values(array(
'name' => 'user_email_verification', 'name' => 'user_email_verification',
'value' => 'i:1;', 'value' => 'i:1;',
...@@ -30,7 +30,7 @@ class MigrateUpgradeForm extends ConfirmFormBase { ...@@ -30,7 +30,7 @@ class MigrateUpgradeForm extends ConfirmFormBase {
* @var array[] * @var array[]
*/ */
protected $moduleUpgradePaths = [ protected $moduleUpgradePaths = [
'd6_action_settings' => [ 'action_settings' => [
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'action', 'destination_module' => 'action',
], ],
...@@ -214,7 +214,7 @@ class MigrateUpgradeForm extends ConfirmFormBase { ...@@ -214,7 +214,7 @@ class MigrateUpgradeForm extends ConfirmFormBase {
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'file', 'destination_module' => 'file',
], ],
'd6_file_settings' => [ 'file_settings' => [
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'file', 'destination_module' => 'file',
], ],
...@@ -422,19 +422,19 @@ class MigrateUpgradeForm extends ConfirmFormBase { ...@@ -422,19 +422,19 @@ class MigrateUpgradeForm extends ConfirmFormBase {
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'system', 'destination_module' => 'system',
], ],
'd6_system_image' => [ 'system_image' => [
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'system', 'destination_module' => 'system',
], ],
'd6_system_image_gd' => [ 'system_image_gd' => [
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'system', 'destination_module' => 'system',
], ],
'd6_system_logging' => [ 'system_logging' => [
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'system', 'destination_module' => 'system',
], ],
'd6_system_maintenance' => [ 'system_maintenance' => [
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'system', 'destination_module' => 'system',
], ],
...@@ -442,11 +442,35 @@ class MigrateUpgradeForm extends ConfirmFormBase { ...@@ -442,11 +442,35 @@ class MigrateUpgradeForm extends ConfirmFormBase {
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'system', 'destination_module' => 'system',
], ],
'd6_system_rss' => [ 'system_rss' => [
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'system', 'destination_module' => 'system',
], ],
'd6_system_site' => [ 'system_site' => [
'source_module' => 'system',
'destination_module' => 'system',
],
'd7_system_authorize' => [
'source_module' => 'system',
'destination_module' => 'system',
],
'd7_system_cron' => [
'source_module' => 'system',
'destination_module' => 'system',
],
'd7_system_date' => [
'source_module' => 'system',
'destination_module' => 'system',
],
'd7_system_file' => [
'source_module' => 'system',
'destination_module' => 'system',
],
'd7_system_mail' => [
'source_module' => 'system',
'destination_module' => 'system',
],
'd7_system_performance' => [
'source_module' => 'system', 'source_module' => 'system',
'destination_module' => 'system', 'destination_module' => 'system',
], ],
......
...@@ -49,7 +49,7 @@ protected function getEntityCounts() { ...@@ -49,7 +49,7 @@ protected function getEntityCounts() {
'filter_format' => 7, 'filter_format' => 7,
'image_style' => 6, 'image_style' => 6,
'language_content_settings' => 2, 'language_content_settings' => 2,
'migration' => 59, 'migration' => 73,
'node' => 3, 'node' => 3,
'node_type' => 6, 'node_type' => 6,
'rdf_mapping' => 5, 'rdf_mapping' => 5,
......
id: d7_system_authorize
migration_tags:
- Drupal 7
source:
plugin: variable
variables:
- authorize_filetransfer_default
process:
filetransfer_default: authorize_filetransfer_default
destination:
plugin: config
config_name: system.authorize
id: d7_system_cron
label: Drupal 7 cron settings
migration_tags:
- Drupal 7
source:
plugin: variable
variables:
- cron_threshold_warning
- cron_threshold_error
process:
'threshold/requirements_warning': cron_threshold_warning
'threshold/requirements_error': cron_threshold_error
destination:
plugin: config
config_name: system.cron
id: d7_system_date
migration_tags:
- Drupal 7
source:
plugin: variable
variables:
- site_default_country
- date_first_day
- date_default_timezone
- configurable_timezones
- empty_timezone_message
- user_default_timezone
process:
'country/default': site_default_country
first_day: date_first_day
'timezone/default': date_default_timezone
'timezone/user/configurable': configurable_timezones
'timezone/user/warn': empty_timezone_message
'timezone/user/default': user_default_timezone
destination:
plugin: config
config_name: system.date
id: d7_system_file
label: Drupal 7 file system configuration
migration_tags:
- Drupal 7
source:
plugin: variable
variables:
- allow_insecure_uploads
- file_temporary_path
process:
allow_insecure_uploads:
plugin: static_map