[Koha-devel] Frameworks / DB constraints

Galen Charlton gmc at esilibrary.com
Wed Apr 20 04:03:23 CEST 2016


Hi,

On Tue, Apr 19, 2016 at 11:16 AM, Tajoli Zeno <z.tajoli at cineca.it> wrote:
> I'm agree on solution proposed by Jesse: creating the foreign key with ON
> DELETE SET NULL.

At the moment, biblio.frameworkcode doesn't permit NULL values, and
InnoDB doesn't support ON DELETE SET DEFAULT.  That doesn't mean that
we couldn't do more work so that frameworkcode IS NULL is fully
supported, but it's not *just* a matter of adding the FK.

I'm more in favor of either:

- adding a FK that does ON DELETE RESTRICT. For most databases, this
would require adding a row to biblio_framework whose frameworkcode is
the empty string.
- having the business logic take care of falling back to the default
framework when necessary.

Regards,

Galen
-- 
Galen Charlton
Infrastructure and Added Services Manager
Equinox Software, Inc. / Open Your Library
email:  gmc at esilibrary.com
direct: +1 770-709-5581
cell:   +1 404-984-4366
skype:  gmcharlt
web:    http://www.esilibrary.com/
Supporting Koha and Evergreen: http://koha-community.org &
http://evergreen-ils.org


More information about the Koha-devel mailing list