You are here

function menu_per_role_install in Menu Per Role 5

Same name and namespace in other branches
  1. 6 menu_per_role.install \menu_per_role_install()

File

./menu_per_role.install, line 3

Code

function menu_per_role_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      db_query("CREATE TABLE if not exists {menu_per_role} (\n        mid int(10) unsigned,\n        rid int(10) unsigned,\n        PRIMARY KEY(mid, rid)\n      ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {menu_per_role} (\n        mid integer,\n        rid integer,\n        PRIMARY KEY(mid, rid)\n      )");
    default:
      break;
  }
}