You are here

function password_policy_update_6005 in Password Policy 6

Make sure name column on password_policy_role is set with corrsponding name

File

./password_policy.install, line 297
File module installation and upgrade code.

Code

function password_policy_update_6005() {
  $ret = array();

  // update name based on name from password_policy table where pid's match
  // update password_policy_role pr, password_policy
  // set pr.name = pp.name
  // where pr.pid = pp.pid;
  $ret[] = update_sql("UPDATE {password_policy_role} pr SET name = (SELECT name FROM {password_policy} pp WHERE pr.pid = pp.pid)");
  return $ret;
}