-- 2014-11-09	 To facilitate dynamic customization of input dialog for a feature
ALTER TABLE FEATUREDEFINITION ADD DIALOGJAVASCRIPT TEXT;

-- 2015-01-28	 To facilitate group ownership of a document
ALTER TABLE DOCUMENT ADD GROUPID VARCHAR(60);

-- 2015-05-01	 To facilitate applying diffent levels of copying protection to image display
ALTER TABLE SURROGATEIMAGE ADD PROTECTLEVEL INTEGER default 0;

-- 2016-06-14	 To facilitate options from Cat's Collation Editor 
ALTER TABLE REGULARIZATIONRULE ADD RULEOPTIONS INTEGER default 0;
ALTER TABLE REGULARIZATIONRULE ADD CREATEDATE timestamp default CURRENT_TIMESTAMP;

CREATE TABLE `REGULARIZATIONRULEEXCEPTION` (
  `REGULARIZATIONRULEID` int(11) NOT NULL,
  `VERSE` int(11) NOT NULL,
  `GROUPNAME` varchar(40) NOT NULL DEFAULT 'Unassigned',
  `USERID` varchar(200) DEFAULT NULL,
  `CREATEDATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`REGULARIZATIONRULEID`,`VERSE`,`GROUPNAME`,`USERID`),
  KEY `BIBLICALCONTENTVERSE` (`VERSE`,`GROUPNAME`,`USERID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- 2016-10-07	To facilitate per document versification
ALTER TABLE DOCUMENT ADD V11N VARCHAR(60) DEFAULT NULL;

-- 2016-10-30	To facilitate per project transcription attribution
ALTER TABLE PROJECT ADD TRANSCRIPTIONATTRIBUTION VARCHAR(254) DEFAULT NULL;
