[Koha-bugs] [Bug 23805] Add a dedicated credit_types table
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Nov 5 15:19:40 CET 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23805
--- Comment #57 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Martin Renvoize from comment #53)
> As a final note, there has been a check constraint in Koha since 2012-09-12
> when one was added as part of bug 5911
+CREATE TABLE transport_cost (
+ frombranch varchar(10) NOT NULL,
+ 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
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
a dud check? Interestingly, MySQL 5.5, 5.7 allows you to define CHECK
constraints, but with the note that they are parsed, but ignored by all storage
engines.
I am having the impression that this explained why I saw it and you did not.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list