[Koha-patches] [PATCH] DB Update 77 : add lastincrement column to accountlines
Ryan Higgins
rch at balrog.liblime.com
Mon May 12 12:29:37 CEST 2008
---
installer/data/mysql/kohastructure.sql | 1 +
installer/data/mysql/updatedatabase.pl | 7 +++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql
index f0130c5..67f6e57 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 7f6324c..51df4a7 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -1510,6 +1510,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
+$DBversion = "3.00.00.077";
+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);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
--
1.5.4.2
More information about the Koha-patches
mailing list