You are here

function radioactivity_arbitrary_target_install in Radioactivity 5

File

plugins/radioactivity_arbitrary_target.install, line 3

Code

function radioactivity_arbitrary_target_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {radioactivity_arbitrary_target} (\n                  `rad_id` int(11) NOT NULL,\n                  `arb_id` varchar(255) NOT NULL,\n                  PRIMARY KEY  (`rad_id`,`arb_id`)\n        ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {radioactivity_arbitrary_target} (\n                  rad_id int NOT NULL,\n                  arb_id varchar(255) NOT NULL,\n                  PRIMARY KEY  (rad_id, arb_id)\n        )");
      db_query("CREATE SEQUENCE {radioactivity_arbitrary_target}_rad_id_seq");
      break;
  }
}