You are here

function multiblock_install in MultiBlock 5

Same name and namespace in other branches
  1. 6 multiblock.install \multiblock_install()

File

./multiblock.install, line 3

Code

function multiblock_install() {
  switch ($GLOBALS['db_type']) {
    case 'pgsql':
      db_query("CREATE TABLE {multiblock} (\n        delta int_unsigned NOT NULL default '1',\n        title varchar(64) NOT NULL default '',\n        module varchar(64) NOT NULL default '',\n        orig_delta varchar(32) NOT NULL default '',\n        multi_settings int_unsigned NOT NULL default '0',\n        PRIMARY KEY (delta)\n       )");
      db_query("CREATE SEQUENCE {multiblock}_delta_seq INCREMENT 1 START 1;");
      break;
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {multiblock} (\n        delta int(11) UNSIGNED NOT NULL DEFAULT '1',\n        title varchar(64) NOT NULL ,\n        module varchar(64) NOT NULL ,\n        orig_delta varchar(32) NOT NULL ,\n        multi_settings int(10) NOT NULL DEFAULT '0',\n        PRIMARY KEY (delta)\n      )");
      break;
  }
}