You are here

function password_policy_update_1 in Password Policy 5

Implementation of hook_update_X().

Add a table to store password expiration information.

Return value

array

File

./password_policy.install, line 65

Code

function password_policy_update_1() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("CREATE TABLE {password_policy_expiration} (\n        uid int(10) unsigned NOT NULL,\n        warning int(11) default NULL,\n        blocked int(11) default NULL,\n        unblocked int(11) default NULL,\n        KEY (uid)\n      ) /*!40100 DEFAULT CHARACTER SET utf8 */");
      $ret[] = update_sql("ALTER TABLE {password_policy} ADD created int(11) default NULL");
      break;
  }
  return $ret;
}