<div dir="ltr"><div>I have almost complete the <a href="http://updatadatabase.pl">updatadatabase.pl</a> without db errors.<br><br></div>Now I'm missing some data on userflags, what should be the 13 module_bit<br><br>Upgrade to 3.00.00.067 done (Updating patronimages syspref to reflect current kohastructure.sql. ) <br>DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha3`.`permissions`, CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`module_bit`) REFERENCES `userflags` (`bit`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement "INSERT INTO permissions (module_bit, code, description) VALUES<br>    (13, 'edit_news', 'Write news for the OPAC and staff interfaces'),<br>    (13, 'label_creator', 'Create printable labels and barcodes from catalog and patron data'),<br>    (13, 'edit_calendar', 'Define days when the library is closed'),<br>    (13, 'moderate_comments', 'Moderate patron comments'),<br>    (13, 'edit_notices', 'Define notices'),<br>    (13, 'edit_notice_status_triggers', 'Set notice/status triggers for overdue items'),<br>    (13, 'view_system_logs', 'Browse the system logs'),<br>    (13, 'inventory', 'Perform inventory (stocktaking) of your catalogue'),<br>    (13, 'stage_marc_import', 'Stage MARC records into the reservoir'),<br>    (13, 'manage_staged_marc', 'Managed staged MARC records, including completing and reversing imports'),<br>    (13, 'export_catalog', 'Export bibliographic and holdings data'),<br>    (13, 'import_patrons', 'Import patron data'),<br>    (13, 'delete_anonymize_patrons', 'Delete old borrowers and anonymize circulation history (deletes borrower reading history)'),<br>    (13, 'batch_upload_patron_images', 'Upload patron images in batch or one at a time'),<br>    (13, 'schedule_tasks', 'Schedule tasks to run')"] at <a href="http://updatedatabase.pl">updatedatabase.pl</a> line 1294.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 14, 2016 at 11:12 AM, Rodrigo Santellan <span dir="ltr"><<a href="mailto:rsantellan@gmail.com" target="_blank">rsantellan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Jonathan,<br><br></div>I'm planning to open a bug report and patches when I finish. Don't want open more than one bug.<br><br></div>I'm adjusting some SQL that are not ok.<br><br></div>Regards<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 14, 2016 at 4:16 AM, Jonathan Druart <span dir="ltr"><<a href="mailto:jonathan.druart@bugs.koha-community.org" target="_blank">jonathan.druart@bugs.koha-<wbr>community.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These errors are fixes by 3.01.00.009, certainly because MySQL<br>
strictness has changed since 3.00.00.068<br>
<br>
Try to change the 2 code columns to default null.<br>
If it works, please open a new bug report (and attach a patch if you<br>
know how to do it :))<br>
<br>
Cheers,<br>
Jonathan<br>
<div><div><br>
2016-09-13 16:34 GMT+01:00 Rodrigo Santellan <<a href="mailto:rsantellan@gmail.com" target="_blank">rsantellan@gmail.com</a>>:<br>
> I found out that on the upgrade 3.00.00.068 the script for creating the<br>
> table permissions is wrong:<br>
><br>
> DBD::mysql::db do failed: All parts of a PRIMARY KEY must be NOT NULL; if<br>
> you need NULL in a key, use UNIQUE instead [for Statement "CREATE TABLE<br>
> `permissions` (<br>
>                 `module_bit` int(11) NOT NULL DEFAULT 0,<br>
>                 `code` varchar(30) DEFAULT NULL,<br>
>                 `description` varchar(255) DEFAULT NULL,<br>
>                 PRIMARY KEY  (`module_bit`, `code`),<br>
>                 CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`module_bit`)<br>
> REFERENCES `userflags` (`bit`)<br>
>                     ON DELETE CASCADE ON UPDATE CASCADE<br>
>               ) ENGINE=InnoDB DEFAULT CHARSET=utf8"] at <a href="http://updatedatabase.pl" rel="noreferrer" target="_blank">updatedatabase.pl</a><br>
> line 1273.<br>
> DBD::mysql::db do failed: Cannot add foreign key constraint [for Statement<br>
> "CREATE TABLE `user_permissions` (<br>
>                 `borrowernumber` int(11) NOT NULL DEFAULT 0,<br>
>                 `module_bit` int(11) NOT NULL DEFAULT 0,<br>
>                 `code` varchar(30) DEFAULT NULL,<br>
>                 CONSTRAINT `user_permissions_ibfk_1` FOREIGN KEY<br>
> (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`)<br>
>                     ON DELETE CASCADE ON UPDATE CASCADE,<br>
>                 CONSTRAINT `user_permissions_ibfk_2` FOREIGN KEY<br>
> (`module_bit`, `code`)<br>
>                     REFERENCES `permissions` (`module_bit`, `code`)<br>
>                     ON DELETE CASCADE ON UPDATE CASCADE<br>
>               ) ENGINE=InnoDB DEFAULT CHARSET=utf8"] at <a href="http://updatedatabase.pl" rel="noreferrer" target="_blank">updatedatabase.pl</a><br>
> line 1281.<br>
><br>
> Has anybody has the correct definition of the table permissions?<br>
><br>
> Regards.<br>
><br>
> On Tue, Sep 13, 2016 at 11:35 AM, Rodrigo Santellan <<a href="mailto:rsantellan@gmail.com" target="_blank">rsantellan@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I have changed: 3.00.00.053 to remove the constraint to labels_templates<br>
>> and now it goes smooth on that part. I'll add more logging when the db query<br>
>> are executed because there are some tables like permissions that are not<br>
>> created.<br>
>><br>
>> Thanks a lot!<br>
>><br>
>> On Tue, Sep 13, 2016 at 4:29 AM, Jonathan Druart<br>
>> <<a href="mailto:jonathan.druart@bugs.koha-community.org" target="_blank">jonathan.druart@bugs.koha-com<wbr>munity.org</a>> wrote:<br>
>>><br>
>>> It has been removed by<br>
>>> commit c102b61ef58dc34860e8acf6cab6bd<wbr>9a96dae0a1<br>
>>> Date:   Mon Jan 4 14:18:01 2010 -0500<br>
>>>     [26/30] Updating kohastructure.sql to reflect changes introduced<br>
>>> in Patron Card Creator work<br>
>>><br>
>>> But indeed these changes have not been put in the <a href="http://updatedatabase.pl" rel="noreferrer" target="_blank">updatedatabase.pl</a> file.<br>
>>> You can ignore this table.<br>
>>><br>
>>> 2016-09-13 0:02 GMT+01:00 Michael Hafen <<a href="mailto:michael.hafen@washk12.org" target="_blank">michael.hafen@washk12.org</a>>:<br>
>>> > There's also update 61 which references the labels_templates table.<br>
>>> > You'd<br>
>>> > have to omit that one too.<br>
>>> > That table is gone, but I don't know when it gets dropped.  I looked<br>
>>> > through<br>
>>> > <a href="http://updatedatabase.pl" rel="noreferrer" target="_blank">updatedatabase.pl</a> and didn't see it get dropped.  So I don't know.  If<br>
>>> > you<br>
>>> > are aiming for a recent release then it should be ok to omit the table<br>
>>> > and<br>
>>> > those two updates.<br>
>>> ><br>
>>> > On Mon, Sep 12, 2016 at 1:04 PM, Rodrigo Santellan<br>
>>> > <<a href="mailto:rsantellan@gmail.com" target="_blank">rsantellan@gmail.com</a>><br>
>>> > wrote:<br>
>>> >><br>
>>> >> Passing the conditions in true (1 == 1 ) on lines 2623 and 3418 I'm<br>
>>> >> able<br>
>>> >> to pass further on the <a href="http://updatedatabase.pl" rel="noreferrer" target="_blank">updatedatabase.pl</a><br>
>>> >><br>
>>> >> But the problems are on migrating to 3.00.00.053 the definitions that<br>
>>> >> are<br>
>>> >> needed on that table are on 3.00.00.059. My intuition says to change<br>
>>> >> the<br>
>>> >> order, but I have to be honest that I don't know the consequences and<br>
>>> >> according to the IRC chat the table labels_templates is gone.<br>
>>> >><br>
>>> >> Should I ommit them both?<br>
>>> >><br>
>>> >> Thanks!<br>
>>> >><br>
>>> >> On Mon, Sep 12, 2016 at 1:56 PM, Michael Hafen<br>
>>> >> <<a href="mailto:michael.hafen@washk12.org" target="_blank">michael.hafen@washk12.org</a>><br>
>>> >> wrote:<br>
>>> >>><br>
>>> >>> Have you looked in the /installer/data/mysql directory at the<br>
>>> >>> <a href="http://labels_upgrade.pl" rel="noreferrer" target="_blank">labels_upgrade.pl</a> and <a href="http://patroncards_upgrade.pl" rel="noreferrer" target="_blank">patroncards_upgrade.pl</a> scripts.  I think those<br>
>>> >>> where<br>
>>> >>> supposed to be run by the <a href="http://updatedatabase.pl" rel="noreferrer" target="_blank">updatedatabase.pl</a> script, but I seem to<br>
>>> >>> recall<br>
>>> >>> having trouble with that myself.<br>
>>> >>><br>
>>> >>> On Mon, Sep 12, 2016 at 7:07 AM, Rodrigo Santellan<br>
>>> >>> <<a href="mailto:rsantellan@gmail.com" target="_blank">rsantellan@gmail.com</a>><br>
>>> >>> wrote:<br>
>>> >>>><br>
>>> >>>> Hi,<br>
>>> >>>><br>
>>> >>>> I'm trying to do a migration or upgrade from koha 2.2.3 to koha 3. I<br>
>>> >>>> know is a daunting task that I have embarked but I'm trying to bring<br>
>>> >>>> back a<br>
>>> >>>> library to the latest updates of the community.<br>
>>> >>>><br>
>>> >>>> So far this are the steps I have done:<br>
>>> >>>> 1 - I dump an empty schema of the DB and create a new one with the<br>
>>> >>>> name<br>
>>> >>>> koha3.<br>
>>> >>>> 2 - Apply the <a href="http://update22to30.pl" rel="noreferrer" target="_blank">update22to30.pl</a><br>
>>> >>>> 3 - Import all the tables I could, the one that not been deleted.<br>
>>> >>>> 4 - Run <a href="http://updatedatabase.pl" rel="noreferrer" target="_blank">updatedatabase.pl</a><br>
>>> >>>><br>
>>> >>>> And now I'm stuck there, I'm missing the table: labels_templates and<br>
>>> >>>> the<br>
>>> >>>> table printers_profile is different.<br>
>>> >>>><br>
>>> >>>> I have asked on the IRC channel and they say that table<br>
>>> >>>> labels_templates<br>
>>> >>>> is gone on 3.18.<br>
>>> >>>><br>
>>> >>>> I'm heading on a good direction? Or I should do a clean install and<br>
>>> >>>> then<br>
>>> >>>> try to import all the old data?<br>
>>> >>>><br>
>>> >>>> I will appreciate any help! Thanks in advance!<br>
>>> >>>><br>
>>> >>>> Regards.<br>
>>> >>>><br>
>>> >>>> Rodrigo Santellán.<br>
>>> >>>><br>
>>> >>>> ______________________________<wbr>_________________<br>
>>> >>>> Koha-devel mailing list<br>
>>> >>>> <a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-communit<wbr>y.org</a><br>
>>> >>>> <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.or<wbr>g/cgi-bin/mailman/listinfo/koh<wbr>a-devel</a><br>
>>> >>>> website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
>>> >>>> git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
>>> >>>> bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org<wbr>/</a><br>
>>> >>><br>
>>> >>><br>
>>> >>><br>
>>> >>><br>
>>> >>> --<br>
>>> >>> Michael Hafen<br>
>>> >>> Washington County School District Technology Department<br>
>>> >>> Systems Analyst<br>
>>> >>><br>
>>> >><br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> > --<br>
>>> > Michael Hafen<br>
>>> > Washington County School District Technology Department<br>
>>> > Systems Analyst<br>
>>> ><br>
>>> ><br>
>>> > ______________________________<wbr>_________________<br>
>>> > Koha-devel mailing list<br>
>>> > <a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-communit<wbr>y.org</a><br>
>>> > <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.or<wbr>g/cgi-bin/mailman/listinfo/koh<wbr>a-devel</a><br>
>>> > website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
>>> > git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
>>> > bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org<wbr>/</a><br>
>>> ______________________________<wbr>_________________<br>
>>> Koha-devel mailing list<br>
>>> <a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-communit<wbr>y.org</a><br>
>>> <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.or<wbr>g/cgi-bin/mailman/listinfo/koh<wbr>a-devel</a><br>
>>> website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
>>> git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
>>> bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org<wbr>/</a><br>
>><br>
>><br>
><br>
______________________________<wbr>_________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-communit<wbr>y.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.or<wbr>g/cgi-bin/mailman/listinfo/koh<wbr>a-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org<wbr>/</a></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>