--- /dev/null
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+
+ if( !column_exists( 'illrequestattributes', 'readonly' ) ) {
+ $dbh->do( "ALTER TABLE illrequestattributes ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1" );
+ $dbh->do( "UPDATE illrequestattributes SET readonly = 1" );
+ }
+
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 20772 - Add illrequestattributes.readonly column)\n";
+}
CREATE TABLE illrequestattributes (
illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number
type varchar(200) NOT NULL, -- API ILL property name
- value MEDIUMTEXT NOT NULL, -- API ILL property value
+ value MEDIUMTEXT NOT NULL, -- API ILL property value
+ readonly tinyint(1) NOT NULL DEFAULT 1, -- Is this attribute read only
PRIMARY KEY (`illrequest_id`, `type` (191)),
CONSTRAINT `illrequestattributes_ifk`
FOREIGN KEY (illrequest_id)