Bugzilla – Attachment 122323 Details for
Bug 25078
Update DB process - wrap each DBRev inside a transaction and better error handling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25078: [DO NOT PUSH] DB revs for testing
Bug-25078-DO-NOT-PUSH-DB-revs-for-testing.patch (text/plain), 4.75 KB, created by
Martin Renvoize (ashimema)
on 2021-06-23 11:18:53 UTC
(
hide
)
Description:
Bug 25078: [DO NOT PUSH] DB revs for testing
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-06-23 11:18:53 UTC
Size:
4.75 KB
patch
obsolete
>From edbf67c76fb132b0d6ae7a0c79f59d8a29bcd33b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 14 Jun 2021 14:52:57 +0200 >Subject: [PATCH] Bug 25078: [DO NOT PUSH] DB revs for testing > >Use with the --force flag: > > % updatedatabase --force > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha.pm | 2 +- > installer/data/mysql/db_revs/210600081.pl | 7 +++++++ > installer/data/mysql/db_revs/210600082.pl | 11 +++++++++++ > installer/data/mysql/db_revs/210600083.pl | 7 +++++++ > installer/data/mysql/db_revs/210600090.pl | 10 ++++++++++ > installer/data/mysql/db_revs/210600091.pl | 10 ++++++++++ > installer/data/mysql/db_revs/210600092.pl | 10 ++++++++++ > installer/data/mysql/db_revs/210600094.pl | 11 +++++++++++ > 8 files changed, 67 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/db_revs/210600081.pl > create mode 100644 installer/data/mysql/db_revs/210600082.pl > create mode 100644 installer/data/mysql/db_revs/210600083.pl > create mode 100644 installer/data/mysql/db_revs/210600090.pl > create mode 100644 installer/data/mysql/db_revs/210600091.pl > create mode 100644 installer/data/mysql/db_revs/210600092.pl > create mode 100644 installer/data/mysql/db_revs/210600094.pl > >diff --git a/Koha.pm b/Koha.pm >index b3c28b100b..171728f06e 100644 >--- a/Koha.pm >+++ b/Koha.pm >@@ -29,7 +29,7 @@ use vars qw{ $VERSION }; > # - #4 : the developer version. The 4th number is the database subversion. > # used by developers when the database changes. updatedatabase take care of the changes itself > # and is automatically called by Auth.pm when needed. >-$VERSION = "21.06.00.005"; >+$VERSION = "21.06.00.100"; > > sub version { > return $VERSION; >diff --git a/installer/data/mysql/db_revs/210600081.pl b/installer/data/mysql/db_revs/210600081.pl >new file mode 100644 >index 0000000000..70e2fef187 >--- /dev/null >+++ b/installer/data/mysql/db_revs/210600081.pl >@@ -0,0 +1,7 @@ >+use Modern::Perl; >+ >+{ >+ bug_number => 42322, >+ description => "Single line description", >+ up => sub {}, >+} >diff --git a/installer/data/mysql/db_revs/210600082.pl b/installer/data/mysql/db_revs/210600082.pl >new file mode 100644 >index 0000000000..bd443a444d >--- /dev/null >+++ b/installer/data/mysql/db_revs/210600082.pl >@@ -0,0 +1,11 @@ >+use Modern::Perl; >+ >+my $nb_patrons; >+{ >+ bug_number => 42422, >+ description => sub { ["Testing number of patrons: $nb_patrons"] }, >+ up => sub { >+ my $dbh = C4::Context->dbh; >+ $nb_patrons = $dbh->selectrow_array(q{SELECT COUNT(*) FROM borrowers;}); >+ }, >+} >diff --git a/installer/data/mysql/db_revs/210600083.pl b/installer/data/mysql/db_revs/210600083.pl >new file mode 100644 >index 0000000000..b4e32550d7 >--- /dev/null >+++ b/installer/data/mysql/db_revs/210600083.pl >@@ -0,0 +1,7 @@ >+use Modern::Perl; >+ >+{ >+ bug_number => 42323, >+ description => [qw(Multi lines description)], >+ up => sub {}, >+} >diff --git a/installer/data/mysql/db_revs/210600090.pl b/installer/data/mysql/db_revs/210600090.pl >new file mode 100644 >index 0000000000..802b446c4f >--- /dev/null >+++ b/installer/data/mysql/db_revs/210600090.pl >@@ -0,0 +1,10 @@ >+use Modern::Perl; >+ >+{ >+ bug_number => 42420, >+ description => ["Testing failure"], >+ up => sub { >+ my $dbh = C4::Context->dbh; >+ $dbh->do(q{ALTER TABLE Foo}); >+ }, >+} >diff --git a/installer/data/mysql/db_revs/210600091.pl b/installer/data/mysql/db_revs/210600091.pl >new file mode 100644 >index 0000000000..1a34a20e2b >--- /dev/null >+++ b/installer/data/mysql/db_revs/210600091.pl >@@ -0,0 +1,10 @@ >+use Modern::Perl; >+ >+{ >+ bug_number => 42421, >+ description => ["don't compile"], >+ up => sub { >+ my $dbh = C4::NoContext->dbh; # NoContext does not exist >+ $dbh->do(q{ALTER TABLE Foo}); >+ }, >+} >diff --git a/installer/data/mysql/db_revs/210600092.pl b/installer/data/mysql/db_revs/210600092.pl >new file mode 100644 >index 0000000000..9add21534c >--- /dev/null >+++ b/installer/data/mysql/db_revs/210600092.pl >@@ -0,0 +1,10 @@ >+use Modern::Perl; >+ >+{ >+ bug_number => 42423, >+ description => ["Testing", "multi lines", " failure"], >+ up => sub { >+ my $dbh = C4::Context->dbh; >+ $dbh->do(q{ALTER TABLE Foo}); >+ }, >+} >diff --git a/installer/data/mysql/db_revs/210600094.pl b/installer/data/mysql/db_revs/210600094.pl >new file mode 100644 >index 0000000000..01aa992c29 >--- /dev/null >+++ b/installer/data/mysql/db_revs/210600094.pl >@@ -0,0 +1,11 @@ >+use Modern::Perl; >+ >+{ >+ bug_number => 42424, >+ description => ["Testing transaction"], >+ up => sub { >+ my $dbh = C4::Context->dbh; >+ $dbh->do(q{INSERT INTO cities(city_name) VALUES ('new_city');}); >+ $dbh->do(q{INSERT INTO cities(city_XX) VALUES ('new_XX');}); # This will fail >+ }, >+} >-- >2.20.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 25078
:
102521
|
116032
|
116033
|
116034
|
116208
|
116209
|
117084
|
121909
|
121910
|
121911
|
121982
|
121983
|
121984
|
122208
|
122322
|
122323
|
122324
|
122325
|
122326
|
122329
|
122665
|
122666
|
122667
|
122668
|
122669
|
122670
|
122671
|
122679
|
122680
|
122875
|
123356
|
123357
|
123358
|
123359
|
123360
|
123361
|
123362
|
123363
|
123364
|
123365
|
123366
|
123367
|
123850
|
123851
|
123853
|
123937
|
124269