You are here

function system_update_6011 in Drupal 6

Add language support to nodes

Related topics

File

modules/system/system.install, line 1414

Code

function system_update_6011() {
  $ret = array();
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      db_add_column($ret, 'node', 'language', 'varchar(12)', array(
        'default' => "''",
        'not null' => TRUE,
      ));
      break;
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("ALTER TABLE {node} ADD language varchar(12) NOT NULL default ''");
      break;
  }
  return $ret;
}