https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38602

            Bug ID: 38602
           Summary: Columns bookings.creation_date and
                    bookings.modification_date not added if multiple
                    databases are in use
 Change sponsored?: ---
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Database
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

I have multiple databases in use for different versions of Koha and two of them
are for Kohas current main version. One smaller one (database A) for running
tests and other larger one (database B) to test e.g. loading times with large
datasets. I updated both of them when version 24.11 was released. Today I tried
to test some patches with database B and while checking out items, following
error occured:

>DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st 
>execute failed: Unknown column 'me.creation_date' in 'field list' at 
>../Koha/Koha/Objects.pm line 321

I searched for the column creation_date from my databases and only database A
has it in bookings table. I then tried to revert my database B's version back
to 24.05 and run updatedatabase.pl to it again. Update printed following:

>Upgrade to 24.06.00.029  [12:07:54]: Bug 37592 - Add creation_date, 
>modification_date fields to bookings table
>Columns 'creation_date' and 'modification_date' already exist in 'bookings' 
>table. Skipping...

In db_rev file 240600029.pl we determine if these columns are already in
database by searching them from information_schema.COLUMNS. In environments
with multiple databases (we have over 30 of them) in use this means that if one
of the databases already has both these columns, adding them to other databases
is skipped.

We should instead check if both of those columns exist with method
column_exists, not from information_schema.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to