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`.
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