Bugzilla – Attachment 22032 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]
Adding new table po_sequence
0002-Bug-4456-Adding-table-po_sequence.patch (text/plain), 3.18 KB, created by
Amit Gupta
on 2013-10-17 16:23:27 UTC
(
hide
)
Description:
Adding new table po_sequence
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2013-10-17 16:23:27 UTC
Size:
3.18 KB
patch
obsolete
>From f15012ff9c95590ee793d932d09e9a3290bcea96 Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amitddng135@gmail.com> >Date: Thu, 17 Oct 2013 21:49:30 +0530 >Subject: [PATCH 2/2] Bug-4456 Adding table po_sequence > >--- > installer/data/mysql/kohastructure.sql | 12 ++++++++++++ > installer/data/mysql/sysprefs.sql | 3 ++- > installer/data/mysql/updatedatabase.pl | 9 +++++++++ > 3 files changed, 23 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index e1e3e96..7a0c8f9 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3276,6 +3276,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 9f57eff..37eb659 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7306,6 +7306,15 @@ 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 > > =head2 TableExists($table) >-- >1.7.9.5 >
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