This script is used to sanitize user data after cloning the database into a non-production environment. Behind the scenes, it uses Drush's sql-sanitize function for Drupal sites, and a special query in WordPress (derived from this blog post).
This project is designed to be included from a site's composer.json file, and placed in its appropriate installation directory by Composer Installers.
In order for this to work, you should have the following in your composer.json file:
{
"require": {
"composer/installers": "^1"
},
"extra": {
"installer-paths": {
"web/private/scripts/quicksilver": ["type:quicksilver-script"]
}
}
}The project can be included by using the command:
composer require pantheon-quicksilver/sanitize-db
api_version: 1
workflows:
clone_database:
after:
- type: webphp
description: Sanitize database
script: private/scripts/quicksilver/pantheon-quicksilver/sanitize-db.php