Bugzilla – Attachment 173551 Details for
Bug 37511
Add option to place the currency symbol before or after the amount
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37511: DB changes
Bug-37511-DB-changes.patch (text/plain), 2.29 KB, created by
Martin Renvoize (ashimema)
on 2024-10-28 15:10:30 UTC
(
hide
)
Description:
Bug 37511: DB changes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-28 15:10:30 UTC
Size:
2.29 KB
patch
obsolete
>From 785e861b09d366b957cb042f4a885548de2b479b Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Tue, 1 Oct 2024 10:36:30 +0000 >Subject: [PATCH] Bug 37511: DB changes > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../data/mysql/atomicupdate/bug_37511.pl | 30 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 31 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_37511.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_37511.pl b/installer/data/mysql/atomicupdate/bug_37511.pl >new file mode 100755 >index 00000000000..23960e1cdf8 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_37511.pl >@@ -0,0 +1,30 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+use Try::Tiny; >+ >+return { >+ bug_number => "37511", >+ description => "Add a new column p_cs_precedes to the table currency", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( !column_exists( 'currency', 'p_cs_precedes' ) ) { >+ try { >+ $dbh->do( >+ q{ >+ ALTER TABLE `currency` ADD COLUMN `p_cs_precedes` tinyint(1) DEFAULT 1 >+ } >+ ); >+ say_success( $out, "Added column p_cs_precedes" ); >+ } catch { >+ say_failure( >+ $out, >+ "Adding column 'currency.p_cs_precedes' failed with errors: $_" >+ ); >+ }; >+ } else { >+ say_info( $out, "Column 'currency.p_cs_precedes' already exists!" ); >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 49c1aeb59d3..380d4f97457 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2538,6 +2538,7 @@ CREATE TABLE `currency` ( > `active` tinyint(1) DEFAULT NULL, > `archived` tinyint(1) DEFAULT 0, > `p_sep_by_space` tinyint(1) DEFAULT 0, >+ `p_cs_precedes` tinyint(1) DEFAULT 1, > PRIMARY KEY (`currency`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; >-- >2.47.0
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 37511
:
172264
|
172265
|
172266
|
172267
|
172286
|
172287
|
172288
|
172289
| 173551 |
173552
|
173553
|
173554
|
173555