From d3fe1ecf331b1fd991852cae4e526bbbb128ee81 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 29 Oct 2007 16:56:36 -0500 Subject: [PATCH] Updating updatedatabase and kohaversion.pl for new reports tables Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- kohaversion.pl | 2 +- updater/updatedatabase | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/kohaversion.pl b/kohaversion.pl index 9a4ae51b51..316732275a 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -8,7 +8,7 @@ # and is automatically called by Auth.pm when needed. sub kohaversion { - return "3.00.00.014"; + return "3.00.00.015"; } 1; diff --git a/updater/updatedatabase b/updater/updatedatabase index 4f292ced7c..e6c619d080 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -346,8 +346,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +<<<<<<< HEAD:updater/updatedatabase $DBversion = "3.00.00.013"; +======= + +>>>>>>> Updating updatedatabase and kohaversion.pl for new reports tables:updater/updatedatabase if (C4::Context->preference("Version") < TransformToNum($DBversion)) { +<<<<<<< HEAD:updater/updatedatabase $dbh->do("CREATE TABLE `import_batches` ( `import_batch_id` int(11) NOT NULL auto_increment, `template_id` int(11) default NULL, @@ -458,6 +463,32 @@ $DBversion = "3.00.00.014"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do("ALTER TABLE subscription ADD lastbranch VARCHAR(4)"); print "Upgrade to $DBversion done (userid index added)\n"; + SetVersion ($DBversion); +} + +$DBversion = "3.00.00.015"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("CREATE TABLE `saved_sql` ( + `id` int(11) NOT NULL auto_increment, + `borrowernumber` int(11) default NULL, + `date_created` datetime default NULL, + `last_modified` datetime default NULL, + `savedsql` text, + `last_run` datetime default NULL, + `report_name` varchar(255) default NULL, + `type` varchar(255) default NULL, + `notes` text, + PRIMARY KEY (`id`), + KEY boridx (`borrowernumber`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + $dbh->do("CREATE TABLE `saved_reports` ( + `id` int(11) NOT NULL auto_increment, + `report_id` int(11) default NULL, + `report` longtext, + `date_run` datetime default NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); + print "Upgrade to $DBversion done (saved_sql and saved_reports added)\n"; SetVersion ($DBversion); } -- 2.39.5