menu_per_role.install in Menu Per Role 5
File
menu_per_role.install
View source
<?php
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;
}
}
function menu_per_role_uninstall() {
db_query("DROP TABLE {menu_per_role}");
}