View source
<?php
function og_menu_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {og_menu} (\n mid int unsigned NOT NULL default '0',\n gid int unsigned NOT NULL default '0',\n is_primary tinyint unsigned NOT NULL default '0',\n parent_mid int unsigned NOT NULL default '0',\n weight int NOT NULL default '0',\n PRIMARY KEY (mid)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
db_query("CREATE TABLE {og_menu} (\n mid integer NOT NULL default '0' CHECK (mid >= 0),\n gid integer NOT NULL default '0' CHECK (gid >= 0),\n is_primary integer NOT NULL default '0' CHECK (is_primary >= 0),\n parent_mid integer NOT NULL default '0' CHECK (parent_mid >= 0),\n weight integer NOT NULL default '0',\n PRIMARY KEY (mid)\n )");
db_query("CREATE INDEX {og_menu}_mid_idx\n ON {og_menu} (mid)");
break;
}
}