Skip to content
Snippets Groups Projects
Commit 2e9eb268 authored by Chris Shantz's avatar Chris Shantz
Browse files

Updated README so it passes codesniffer testing.

parent 95806d44
No related branches found
No related tags found
No related merge requests found
......@@ -25,11 +25,17 @@ $settings['uw_migrate_site_path'] = 'sites/ca.example/files';
// Without this, private files will not migrate. Note that the cookie name does
// not change until the site is re-installed. The value changes with every login
// and you must use a current one.
$settings['uw_migrate_cookies'] = ['SSESSdcf053736230aae183b84256752dbde1' => 'mlTzHWV8pEEjuWEXFv6nj0njzfEEjqI9rny1Pt8fd6c'];
$settings['uw_migrate_cookies'] = ['SSESSdcf053736230aae183b84256752dbde1'
=> 'mlTzHWV8pEEjuWEXFv6nj0njzfEEjqI9rny1Pt8fd6c'];
```
2. Create a migration source database and populate it from the database dump file.
1. Get the database dump file: Run the db_dump job in Jenkins or login to `wms-aux1` and as user `wcmsadmi` run `db-dump.php` from `uw_wcms_tools`. For the Pool, use "staging". Put the resulting `sqldump_filtered` file into your VM. The filename of this will be referred to as `SQL_DUMP_FILE`.
2. Create a migration source database and populate it
from the database dump file.
1. Get the database dump file: Run the db_dump job
in Jenkins or login to `wms-aux1` and as user `wcmsadmi` run `db-dump.php`
from `uw_wcms_tools`. For the Pool, use "staging". Put the
resulting `sqldump_filtered` file into your VM.
The filename of this will be referred to as `SQL_DUMP_FILE`.
2. Create ~/.my.cnf with:
```
[client]
......@@ -38,10 +44,12 @@ $settings['uw_migrate_cookies'] = ['SSESSdcf053736230aae183b84256752dbde1' => 'm
```
3. Run:
```
mysql --execute="DROP DATABASE IF EXISTS migrate_source; CREATE DATABASE migrate_source; GRANT ALL ON migrate_source.* TO 'drupal';"
mysql --execute="DROP DATABASE IF EXISTS migrate_source;
CREATE DATABASE migrate_source; GRANT ALL ON migrate_source.* TO 'drupal';"
mysql migrate_source < SQL_DUMP_FILE
```
I the above, `drupal` must be the database user that this site uses. In d4d, add ` -hmariadb` after `mysql`.
I the above, `drupal` must be the database user that
this site uses. In d4d, add ` -hmariadb` after `mysql`.
3. Run Drush commands using Drush 10:
```
......@@ -49,18 +57,26 @@ drush en uw_migrate -y
drush mim --group=uw --continue-on-failure
```
4. Manually set the site name, colors, and other settings that do not get migrated.
4. Manually set the site name, colors, and other settings
that do not get migrated.
## Commands
* `drush ms --group=uw`: Display available UW migrations.
* `drush mim --group=uw --continue-on-failure`: Run available UW migrations.
* `drush migrate:rollback --group=uw`: Undo a migration. This doesn't completely undo the migration. For a full test, you need to reinstall the site or restore to a database dump of the site before the migration.
* `drush mim uw_ct_site_footer --continue-on-failure`: Manually run one migration. This doesn't take into consideration dependencies.
* `php run-tests.php http://nginx --suppress-deprecations --module uw_migrate`: Run the tests in uw_migrate.
* `drush migrate:rollback --group=uw`: Undo a migration.
This doesn't completely undo the migration. For a full test,
you need to reinstall the site or restore to a database
dump of the site before the migration.
* `drush mim uw_ct_site_footer --continue-on-failure`:
Manually run one migration. This doesn't take into consideration
dependencies.
* `php run-tests.php http://nginx --suppress-deprecations --module uw_migrate`:
Run the tests in uw_migrate.
## Tips
* `skip_on_empty` process plugin [doesn't work correctly with multiple values](https://www.drupal.org/project/drupal/issues/2905929#comment-13537872).
* `skip_on_empty` process plugin [doesn't work correctly with multiple values]
(https://www.drupal.org/project/drupal/issues/2905929#comment-13537872).
There is a workaround to use `single_value` plugin before `skip_on_empty`.
* By default, `changed` property will be overridden when the migration is
executed with `--update` flag (e.g. `drush mim uw_sidebar --update`).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment