alter table opl_zDatabase add studentILL tinyint(1) unsigned not null default 0;
alter table opl_zDatabase add locationId varchar(50);

CREATE TABLE `opl_studentILL` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `uid` int(10) unsigned NOT NULL default '0',
  `zid` tinyint(3) unsigned NOT NULL default '0',
  `rid` int(10) unsigned,
  `title` text,
  `author` text,
  `pubDate` varchar(20) NOT NULL default '',
  `description` text,
  `dRequest` datetime NOT NULL default '0000-00-00 00:00:00',
  `dExpiry` datetime NOT NULL default '0000-00-00 00:00:00',
  `dApproval` datetime,
  `dRejection` datetime,
  `responderList` varchar(255) NOT NULL default '',
  `illAdmin` int(10) unsigned NOT NULL default '0',
  `illID` int(10) unsigned NOT NULL default '0',
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

insert into opl_permission (grpId,name,code) values (4,'ILL Filter','circ_ill_filter');
insert into opl_menuItem (PARENT_ID,orderValue,language,title,path,permission,permissions) values (12,3,'en','Student ILL Request List','/bin/ill/list','','');
update opl_user set permissions=concat_ws(',', permissions, 'circ_ill_filter') where uid=1;
