function simple_access_update_4 in Simple Access 5.2
Updates
File
- ./
simple_access.install, line 137 - Simple Access Installation file
Code
function simple_access_update_4() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
update_sql("CREATE TABLE {simple_access_profiles} (\n pid int(10) NOT NULL default '0',\n name varchar(50) NOT NULL default '',\n weight int(3) NOT NULL default '0',\n PRIMARY KEY (`pid`)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
update_sql("CREATE TABLE {simple_access_profiles_access} (\n pid int(10) unsigned NOT NULL default '0',\n gid int(10) unsigned NOT NULL default '0',\n `view` tinyint(3) unsigned NOT NULL default '0',\n `update` tinyint(3) unsigned NOT NULL default '0',\n `delete` tinyint(3) unsigned NOT NULL default '0',\n PRIMARY KEY (`pid`,`gid`)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
update_sql("CREATE TABLE {simple_access_profiles_node} (\n nid int(10) NOT NULL,\n pid int(10) NOT NULL,\n PRIMARY KEY (`nid`,`pid`)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
update_sql("CREATE TABLE {simple_access_profiles} (\n pid int(10) NOT NULL default '0',\n name varchar(50) NOT NULL default '',\n weight int(3) NOT NULL default '0'\n );");
update_sql("CREATE TABLE {simple_access_profiles_access} (\n pid int(10) unsigned NOT NULL default '0',\n gid int(10) unsigned NOT NULL default '0',\n view tinyint(3) unsigned NOT NULL default '0',\n update tinyint(3) unsigned NOT NULL default '0',\n delete tinyint(3) unsigned NOT NULL default '0'\n );");
update_sql("CREATE TABLE {simple_access_profiles_node} (\n nid int(10) NOT NULL,\n pid int(10) NOT NULL\n );");
break;
}
return array();
}