Bugzilla – Attachment 4153 Details for
Bug 6328
Fine in days does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
DB update and structure change
0002-Bug-6328-Followup-update-DB-structure.patch (text/plain), 2.56 KB, created by
Frédéric Demians
on 2011-05-17 18:16:58 UTC
(
hide
)
Description:
DB update and structure change
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2011-05-17 18:16:58 UTC
Size:
2.56 KB
patch
obsolete
>From e7f641a5d27492786eae4f3da8be5483df793a47 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Fri, 13 May 2011 10:57:21 +0200 >Subject: [PATCH 2/2] Bug 6328 Followup--update DB structure > >Thanks Katrin. >--- > installer/data/mysql/kohastructure.sql | 6 ++++-- > installer/data/mysql/updatedatabase.pl | 4 +++- > 2 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index e3c6f42..37ad2d8 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -232,7 +232,8 @@ CREATE TABLE `borrowers` ( > `dateexpiry` date default NULL, > `gonenoaddress` tinyint(1) default NULL, > `lost` tinyint(1) default NULL, >- `debarred` tinyint(1) default NULL, >+ `debarred` date default NULL, >+ `debarredcomment` VARCHAR(255) DEFAULT NULL, > `contactname` mediumtext, > `contactfirstname` text, > `contacttitle` text, >@@ -684,7 +685,8 @@ CREATE TABLE `deletedborrowers` ( > `dateexpiry` date default NULL, > `gonenoaddress` tinyint(1) default NULL, > `lost` tinyint(1) default NULL, >- `debarred` tinyint(1) default NULL, >+ `debarred` date default NULL, >+ `debarredcomment` VARCHAR(255) DEFAULT NULL, > `contactname` mediumtext, > `contactfirstname` text, > `contacttitle` text, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index ab8ac9a..719c3a5 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4332,12 +4332,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >-$DBversion = "3.05.00.002"; >+$DBversion = "3.05.00.XXX"; > if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > my $borrowers = $dbh->selectcol_arrayref( "SELECT borrowernumber from borrowers where debarred <>0;", { Columns => [1] } ); > $dbh->do("ALTER TABLE borrowers MODIFY debarred DATE DEFAULT NULL;"); > $dbh->do( "UPDATE borrowers set debarred='9999-12-31' where borrowernumber IN (" . join( ",", @$borrowers ) . ");" ) if ($borrowers and scalar(@$borrowers)>0); > $dbh->do("ALTER TABLE borrowers ADD COLUMN debarredcomment VARCHAR(255) DEFAULT NULL AFTER debarred;"); >+ $dbh->do("ALTER TABLE deletedborrowers MODIFY debarred DATE DEFAULT NULL;"); >+ $dbh->do("ALTER TABLE deletedborrowers ADD COLUMN debarredcomment VARCHAR(255) DEFAULT NULL AFTER debarred;"); > print "Upgrade done (Change borrowers.debarred into Date )\n"; > > SetVersion($DBversion); >-- >1.7.5.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6328
:
4074
|
4098
|
4152
|
4153
|
4154
|
4155
|
4156
|
4186
|
4187
|
4188
|
4277
|
5283
|
5561
|
5841
|
6019
|
6421
|
6429
|
7248