Bugzilla – Attachment 172286 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.23 KB, created by
Roman Dolny
on 2024-10-01 19:24:24 UTC
(
hide
)
Description:
Bug 37511: DB changes
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2024-10-01 19:24:24 UTC
Size:
2.23 KB
patch
obsolete
>From 5f74d2887f9972a5b02ea866d54a7ffee24f6a0a 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> >--- > .../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 0000000000..23960e1cdf >--- /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 31f0828a24..7d00c62307 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2537,6 +2537,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.39.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 37511
:
172264
|
172265
|
172266
|
172267
|
172286
|
172287
|
172288
|
172289
|
173551
|
173552
|
173553
|
173554
|
173555