Jungle Ran

Sanitize Drupal DB

May 29, 2019

#!/usr/bin/env bash
drush sqlq "UPDATE users_field_data SET mail = CONCAT(SUBSTRING_INDEX(users_field_data.mail, '@', 1), '@example.com');"
drush sqlq "UPDATE users_field_data SET init = CONCAT(SUBSTRING_INDEX(users_field_data.init, '@', 1), '@example.com') WHERE init is NOT NULL;"
drush sqlq "UPDATE users_field_data SET pass = NULL;"
drush upwd admin password

TBC


Jungle Ran

Written by Jungle Ran who lives in Chongqing » Read More
@jungleran