Bugzilla – Attachment 22535 Details for
Bug 4456
Enable addition of PO Number to order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug-4456 Adding table po_sequence
Bug-4456-Adding-table-posequence.patch (text/plain), 3.15 KB, created by
Chris Cormack
on 2013-10-30 07:21:44 UTC
(
hide
)
Description:
Bug-4456 Adding table po_sequence
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-10-30 07:21:44 UTC
Size:
3.15 KB
patch
obsolete
>From 16b5ac8079b1297077b369bac025ebf9b9fc23dd Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amitddng135@gmail.com> >Date: Thu, 17 Oct 2013 21:49:30 +0530 >Subject: [PATCH] Bug-4456 Adding table po_sequence > >--- > installer/data/mysql/kohastructure.sql | 12 ++++++++++++ > installer/data/mysql/sysprefs.sql | 3 ++- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > 3 files changed, 22 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index a6a779e..21c01ee 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3313,6 +3313,18 @@ ALTER TABLE `patron_list_patrons` > ADD CONSTRAINT patron_list_patrons_ibfk_2 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE; > > >+-- >+-- Table structure for table 'po_sequence' >+-- >+ >+DROP TABLE IF EXISTS po_sequence >+CREATE TABLE IF NOT EXISTS po_sequence ( >+ seqid varchar(10) PRIMARY KEY, >+ seq_value bigint(20) unsigned NOT NULL, >+ PRIMARY KEY (seqid) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+ >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 71513ce..5b0b406 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -419,5 +419,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'), > ('yuipath','local','local|http://yui.yahooapis.com/2.5.1/build','Insert the path to YUI libraries, choose local if you use koha offline','Choice'), > ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), >-('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo') >+('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'), >+('EnablePONumber',0,'Enable purchase order number',NULL,'YesNo') > ; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 3d2ca44..e9df767 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7595,6 +7595,14 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.13.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('EnablePONumber',0,'Enable purchase order number',NULL,'YesNo')"); >+ $dbh->do("CREATE TABLE IF NOT EXISTS po_sequence (seqid varchar(10) PRIMARY KEY, seq_value bigint(20) unsigned NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); >+ $dbh->do(q{INSERT INTO po_sequence values('POSEQ', 1)}); >+ print "Upgrade to $DBversion done (Bug 4456 - Add systempreferences to enabling purchaseordernumber and create new table po_sequence)\n"; >+ SetVersion ($DBversion); >+} > > =head1 FUNCTIONS > >-- >1.8.4.rc3
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 4456
:
20283
|
22031
|
22032
|
22534
| 22535