You are here

function replication_update_1 in Replication 5.0

Same name and namespace in other branches
  1. 5 replication.install \replication_update_1()

Implementation of hook_update

File

./replication.install, line 47

Code

function replication_update_1() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $ret[] = update_sql("CREATE TABLE {replication} (\n        `slaveid` varchar(10) NOT NULL,\n        `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,\n        PRIMARY KEY  (`slaveid`)\n      ) /*!40100 DEFAULT CHARACTER SET utf8 */");
      drupal_set_message("Please ensure that you correctly patch your includes/database.mysql.inc files!");
      break;
    case 'pgsql':
      drupal_set_message("Your database is not supported by this module");
      break;
  }
  return $ret;
}