MT 1587 (Follow-up) : CSV export for cart and shelves (export_format table creation)
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Thu, 10 Sep 2009 13:18:01 +0000 (15:18 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 10 Feb 2010 13:01:28 +0000 (14:01 +0100)
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

index 5a98d86..37d0cb0 100644 (file)
@@ -967,6 +967,20 @@ CREATE TABLE `ethnicity` (
   PRIMARY KEY  (`code`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
+--
+-- Table structure for table `export_format`
+--
+
+DROP TABLE IF EXISTS `export_format`;
+CREATE TABLE `export_format` (
+  `export_format_id` int(11) NOT NULL auto_increment,
+  `profile` varchar(255) NOT NULL,
+  `description` mediumtext NOT NULL,
+  `marcfields` mediumtext NOT NULL,
+  PRIMARY KEY  (`export_format_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Used for CSV export';
+
+
 --
 -- Table structure for table `hold_fill_targets`
 --
index 0e4a96b..bcefdcc 100755 (executable)
@@ -2700,7 +2700,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 $DBversion = "3.01.00.062";
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES ( 13, 'manage_csv_profiles', 'Manage CSV export profiles')");
-    print "Upgrade to $DBversion done (added permissions for csv export profiles)\n";
+    $dbh->do(q/
+       CREATE TABLE `export_format` (
+         `export_format_id` int(11) NOT NULL auto_increment,
+         `profile` varchar(255) NOT NULL,
+         `description` mediumtext NOT NULL,
+         `marcfields` mediumtext NOT NULL,
+         PRIMARY KEY  (`export_format_id`)
+       ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Used for CSV export';
+    /);
+    print "Upgrade to $DBversion done (added csv export profiles)\n";
 }
 
 =item