You are here

function protected_node_update_3 in Protected Node 5

Same name and namespace in other branches
  1. 6 protected_node.install \protected_node_update_3()

Implementation of hook_update_N()

We don't need a variable length column just 40 char one for the sha1 hash

File

./protected_node.install, line 84

Code

function protected_node_update_3() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {protected_nodes} MODIFY COLUMN passwd CHAR(40) NOT NULL");
      break;
    case 'pgsql':
      $ret[] = update_sql("ALTER TABLE {protected_nodes} ALTER COLUMN passwd TYPE CHAR(40)");
      break;
  }
  return $ret;
}