From 9db5a7b30f00cba2045185f5169c74606ad8a88b Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Mon, 12 May 2008 05:29:37 -0500 Subject: [PATCH] DB Update 77 : add lastincrement column to accountlines Signed-off-by: Joshua Ferraro --- installer/data/mysql/kohastructure.sql | 1 + installer/data/mysql/updatedatabase.pl | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 2a4ea30b15..c3d475c0f9 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -30,6 +30,7 @@ CREATE TABLE `accountlines` ( `dispute` mediumtext, `accounttype` varchar(5) default NULL, `amountoutstanding` decimal(28,6) default NULL, + `lastincrement` decimal(28,6) default NULL, `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `notify_id` int(11) NOT NULL default 0, `notify_level` int(2) NOT NULL default 0, diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a54961e1e5..ce3c094277 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -1512,8 +1512,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } - - $DBversion = "3.00.00.081"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do("CREATE TABLE `borrower_attribute_types` ( @@ -1541,6 +1539,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { ) ENGINE=InnoDB DEFAULT CHARSET=utf8"); $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ExtendedPatronAttributes','0','Use extended patron IDs and attributes',NULL,'YesNo')"); print "Upgrade to $DBversion done (added borrower_attributes and borrower_attribute_types)\n"; + SetVersion ($DBversion); +} + +$DBversion = "3.00.00.082"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do( q(alter table accountlines add column lastincrement decimal(28,6) default NULL) ); + print "Upgrade to $DBversion done (adding lastincrement column to accountlines table)\n"; SetVersion ($DBversion); } -- 2.39.5