<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Segoe UI Symbol";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>If we set items.itype to NULL, aren’t we potentially causing problems for people who want to JOIN “statistics” and “items” tables?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Do we already have software logic to prevent Item Types from being deleted if they’re used in items or biblioitems? <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>David Cook<o:p></o:p></p><p class=MsoNormal>Systems Librarian<o:p></o:p></p><p class=MsoNormal>Prosentient Systems<o:p></o:p></p><p class=MsoNormal>72/330 Wattle St<o:p></o:p></p><p class=MsoNormal>Ultimo, NSW 2007<o:p></o:p></p><p class=MsoNormal>Australia<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Office: 02 9212 0899<o:p></o:p></p><p class=MsoNormal>Direct: 02 8005 0595<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> koha-devel-bounces@lists.koha-community.org <koha-devel-bounces@lists.koha-community.org> <b>On Behalf Of </b>Tomas Cohen Arazi<br><b>Sent:</b> Wednesday, 31 July 2019 5:08 AM<br><b>To:</b> Katrin Fischer <katrin.fischer.83@web.de><br><b>Cc:</b> koha-devel <koha-devel@lists.koha-community.org><br><b>Subject:</b> Re: [Koha-devel] items.itype FK constraint?<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>We can set a FK constraint while allowing NULL too. The reason for me to post this on the list is to hear (probably) historical reasons for this constraint not to be set already at DB level.<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for your replies!<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>El mar., 30 jul. 2019 a las 16:05, Katrin Fischer (<<a href="mailto:katrin.fischer.83@web.de">katrin.fischer.83@web.de</a>>) escribió:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p>Hi Sophie,<o:p></o:p></p><p>I think on database level we need to allow NULL, because of the item-level_itype 'record level' setting. I understand that itemtypes are not set on item level at all in that case?<o:p></o:p></p><p>Katrin<o:p></o:p></p><p>On 30.07.19 16:32, Sophie Meynieux wrote:<o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p>Hello,<o:p></o:p></p><p>But itype must not be null if syspref item-level_itype is on, isn't it ? <o:p></o:p></p><p>S. Meynieux<o:p></o:p></p><pre>--<o:p></o:p></pre><pre>Responsable support<o:p></o:p></pre><pre>BibLibre<o:p></o:p></pre><pre>+ 33 (0)4 91 81 35 08<o:p></o:p></pre><pre><a href="http://www.biblibre.com" target="_blank">http://www.biblibre.com</a><o:p></o:p></pre><div><p class=MsoNormal>Le 29/07/2019 à 20:17, Katrin Fischer a écrit :<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p>+1<o:p></o:p></p><p>With a on delete set null?<o:p></o:p></p><div><p class=MsoNormal>On 29.07.19 19:39, Tomas Cohen Arazi wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>Why shouldn't we add it :-D<br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><div><div><div><p class=MsoNormal><span style='font-size:9.5pt'>Tomás Cohen Arazi<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:9.5pt'>Theke Solutions (<a href="http://theke.io/" target="_blank">http://theke.io</a>)<br></span><span style='font-size:9.5pt;font-family:"Segoe UI Symbol",sans-serif'>✆</span><span style='font-size:9.5pt'> +54 9351 3513384<br>GPG: B2F3C15F<o:p></o:p></span></p></div></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>Koha-devel mailing list<o:p></o:p></pre><pre><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><o:p></o:p></pre><pre><a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><o:p></o:p></pre><pre>website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><o:p></o:p></pre><pre>git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><o:p></o:p></pre><pre>bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><o:p></o:p></pre></blockquote><p class=MsoNormal><o:p> </o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>Koha-devel mailing list<o:p></o:p></pre><pre><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><o:p></o:p></pre><pre><a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><o:p></o:p></pre><pre>website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><o:p></o:p></pre><pre>git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><o:p></o:p></pre><pre>bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><o:p></o:p></pre></blockquote><p class=MsoNormal><o:p> </o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>Koha-devel mailing list<o:p></o:p></pre><pre><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><o:p></o:p></pre><pre><a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><o:p></o:p></pre><pre>website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><o:p></o:p></pre><pre>git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><o:p></o:p></pre><pre>bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><o:p></o:p></pre></blockquote></div><p class=MsoNormal>_______________________________________________<br>Koha-devel mailing list<br><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br><a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><div><div><div><p class=MsoNormal><span style='font-size:9.5pt'>Tomás Cohen Arazi<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:9.5pt'>Theke Solutions (<a href="http://theke.io/" target="_blank">http://theke.io</a>)<br></span><span style='font-size:9.5pt;font-family:"Segoe UI Symbol",sans-serif'>✆</span><span style='font-size:9.5pt'> +54 9351 3513384<br>GPG: B2F3C15F<o:p></o:p></span></p></div></div></div></div></div></div></body></html>