Bugzilla – Attachment 95191 Details for
Bug 23995
Check constraints are supported differently by MySQL and MariaDB so we should remove them for now.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23995: Remove CHECK constraints from kohastructure
Bug-23995-Remove-CHECK-constraints-from-kohastruct.patch (text/plain), 2.40 KB, created by
Martin Renvoize (ashimema)
on 2019-11-08 10:29:01 UTC
(
hide
)
Description:
Bug 23995: Remove CHECK constraints from kohastructure
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-11-08 10:29:01 UTC
Size:
2.40 KB
patch
obsolete
>From 56bd4c136c51d72a7bcc04859b8ed34ece560f51 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 8 Nov 2019 10:27:06 +0000 >Subject: [PATCH] Bug 23995: Remove CHECK constraints from kohastructure > >MySQL8 and MariaDB10.3 impliment check constraints but utilise >different, incompatible, syntaxes to do so. > >This patch removes the check constraints entirely whilst we work on a >better solution to work around the incompatabilities of the two DBs. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > installer/data/mysql/kohastructure.sql | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 9a0d45420c..15e13047af 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2711,8 +2711,7 @@ CREATE TABLE `accountlines` ( > CONSTRAINT `accountlines_ibfk_branches` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE, > CONSTRAINT `accountlines_ibfk_registers` FOREIGN KEY (`register_id`) REFERENCES `cash_registers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, > CONSTRAINT `accountlines_ibfk_credit_type` FOREIGN KEY (`credit_type_code`) REFERENCES `account_credit_types` (`code`) ON DELETE RESTRICT ON UPDATE CASCADE, >- CONSTRAINT `accountlines_ibfk_debit_type` FOREIGN KEY (`debit_type_code`) REFERENCES `account_debit_types` (`code`) ON DELETE RESTRICT ON UPDATE CASCADE, >- CONSTRAINT `accountlines_check_type` CHECK (`credit_type_code` IS NOT NULL OR `debit_type_code` IS NOT NULL) >+ CONSTRAINT `accountlines_ibfk_debit_type` FOREIGN KEY (`debit_type_code`) REFERENCES `account_debit_types` (`code`) ON DELETE RESTRICT ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- >@@ -3289,7 +3288,6 @@ CREATE TABLE transport_cost ( > tobranch varchar(10) NOT NULL, > cost decimal(6,2) NOT NULL, > disable_transfer tinyint(1) NOT NULL DEFAULT 0, >- CHECK ( frombranch <> tobranch ), -- a dud check, mysql does not support that > PRIMARY KEY (frombranch, tobranch), > CONSTRAINT transport_cost_ibfk_1 FOREIGN KEY (frombranch) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT transport_cost_ibfk_2 FOREIGN KEY (tobranch) REFERENCES branches (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE >-- >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 23995
:
95191
|
95192
|
97230