Bugzilla – Attachment 94954 Details for
Bug 23673
Separate time sent from time created in message_queue table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23805: (RM follow-up) Remove CHECK constraints
Bug-23805-RM-follow-up-Remove-CHECK-constraints.patch (text/plain), 2.48 KB, created by
Maxime Dufresne
on 2019-11-01 15:06:20 UTC
(
hide
)
Description:
Bug 23805: (RM follow-up) Remove CHECK constraints
Filename:
MIME Type:
Creator:
Maxime Dufresne
Created:
2019-11-01 15:06:20 UTC
Size:
2.48 KB
patch
obsolete
>From 4e6d62a99e88fafee6155ae42a6d2adfd2897b19 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 1 Nov 2019 13:09:31 +0000 >Subject: [PATCH] Bug 23805: (RM follow-up) Remove CHECK constraints > >MariaDB and MySQL support different syntaxes for CHECK constraints at >different versions. To remove complexities in the updatedatabase script >I have opted to remove all CHECK constraints entirely. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >https://bugs.koha-community.org/show_bug.cgi?id=23673 >--- > installer/data/mysql/updatedatabase.pl | 47 -------------------------- > 1 file changed, 47 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index ffd74394b3..d301985be3 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -19894,13 +19894,6 @@ if ( CheckVersion($DBversion) ) { > ); > } > >- # Adding a check constraints to accountlines >- $dbh->do( >- qq{ >- ALTER TABLE accountlines ADD CONSTRAINT `accountlines_check_type` CHECK (accounttype IS NOT NULL OR debit_type_code IS NOT NULL) >- } >- ); >- > # Populating debit_type_code > $dbh->do( > qq{ >@@ -20010,35 +20003,6 @@ if ( CheckVersion($DBversion) ) { > ); > } > >- # Dropping the check constraint in accountlines >- my ($raise_error) = $dbh->{RaiseError}; >- $dbh->{AutoCommit} = 0; >- $dbh->{RaiseError} = 1; >- eval { >- # MariaDB Specific Drop >- $dbh->do( >- qq{ >- ALTER TABLE >- accountlines >- DROP CONSTRAINT >- `accountlines_check_type` >- } >- ); >- }; >- if ($@) { >- # MySQL Specific Drop >- $dbh->do( >- qq{ >- ALTER TABLE >- accountlines >- DROP CHECK >- `accountlines_check_type` >- } >- ); >- } >- $dbh->{AutoCommit} = 1; >- $dbh->{RaiseError} = $raise_error; >- > # Update accountype 'C' to 'CREDIT' > $dbh->do( > qq{ >@@ -20099,17 +20063,6 @@ if ( CheckVersion($DBversion) ) { > } > ); > >- # Adding a check constraints to accountlines >- $dbh->do( >- qq{ >- ALTER TABLE >- accountlines >- ADD CONSTRAINT >- `accountlines_check_type` >- CHECK (credit_type_code IS NOT NULL OR debit_type_code IS NOT NULL) >- } >- ); >- > # Drop accounttype field > $dbh->do( > qq{ >-- >2.17.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 23673
:
94503
|
94504
|
94954
|
96232
|
96346
|
96347
|
96391
|
96392
|
96451
|
96452
|
96643
|
98090
|
98091
|
98419
|
98420
|
98431
|
98432
|
98433
|
98434
|
98435