From 3786fb37fff53eb82996c6dd396fd6b6ebab52b6 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 7 Sep 2017 06:30:53 -0400 Subject: [PATCH] Bug 19269 - database changes --- .../bug19269-add-lccn-pubdate-to-import-records.perl | 10 ++++++++++ installer/data/mysql/kohastructure.sql | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug19269-add-lccn-pubdate-to-import-records.perl diff --git a/installer/data/mysql/atomicupdate/bug19269-add-lccn-pubdate-to-import-records.perl b/installer/data/mysql/atomicupdate/bug19269-add-lccn-pubdate-to-import-records.perl new file mode 100644 index 0000000..2383c21 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug19269-add-lccn-pubdate-to-import-records.perl @@ -0,0 +1,10 @@ +$DBversion = 'XXX'; # will be replaced by the RM + +if( CheckVersion( $DBversion ) ) { + $dbh->do( "ALTER TABLE import_biblios ADD COLUMN lccn varchar(25)" ); + $dbh->do( "ALTER TABLE import_biblios ADD COLUMN pubdate smallint(5)" ); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug XXXXX - Add lccn and pubdate columns to import_biblios)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e227125..92eb663 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -819,6 +819,8 @@ CREATE TABLE `import_biblios` ( `author` varchar(80) default NULL, `isbn` varchar(30) default NULL, `issn` varchar(9) default NULL, + `lccn` varchar(25) default NULL, + `pubdate` smallint(5) default NULL, `has_items` tinyint(1) NOT NULL default 0, CONSTRAINT `import_biblios_ibfk_1` FOREIGN KEY (`import_record_id`) REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE, -- 2.7.4