function simple_access_update_6 in Simple Access 5.2
Rename all the fields named view, update, delete to sa_view, sa_update, sa_delete
File
- ./
simple_access.install, line 214 - Simple Access Installation file
Code
function simple_access_update_6() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {simple_access_node} \n CHANGE `view` sa_view tinyint unsigned default '0',\n CHANGE `update` sa_update tinyint unsigned default '0',\n CHANGE `delete` sa_delete tinyint unsigned default '0' \n ");
$ret[] = update_sql("ALTER TABLE {simple_access_profiles_access} \n CHANGE `view` sa_view tinyint unsigned default '0',\n CHANGE `update` sa_update tinyint unsigned default '0',\n CHANGE `delete` sa_delete tinyint unsigned default '0' \n ");
$ret[] = update_sql("ALTER TABLE {simple_access_owner} \n CHANGE `view` sa_view tinyint unsigned default '0',\n CHANGE `update` sa_update tinyint unsigned default '0',\n CHANGE `delete` sa_delete tinyint unsigned default '0' \n ");
break;
case 'pgsql':
db_change_column($ret, 'simple_access_node', 'view', 'sa_view', 'int');
db_change_column($ret, 'simple_access_node', 'update', 'sa_update', 'int');
db_change_column($ret, 'simple_access_node', 'delete', 'sa_delete', 'int');
db_change_column($ret, 'simple_access_profiles_access', 'view', 'sa_view', 'int');
db_change_column($ret, 'simple_access_profiles_access', 'update', 'sa_update', 'int');
db_change_column($ret, 'simple_access_profiles_access', 'delete', 'sa_delete', 'int');
db_change_column($ret, 'simple_access_owner', 'view', 'sa_view', 'int');
db_change_column($ret, 'simple_access_owner', 'update', 'sa_update', 'int');
db_change_column($ret, 'simple_access_owner', 'delete', 'sa_delete', 'int');
break;
}
return $ret;
}