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

            Bug ID: 35543
           Summary: Error message when upgrading from 23.05 to 23.11
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P5 - low
         Component: Installation and upgrade (web-based installer)
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]

Hello,

I was finishing the upgrade on our catalog from 23.05 to 23.11 via the web
interface this evening when I got the following error message:

=====

Updating database structure
Update errors :

Upgrade to 23.06.00.007 [22:25:29]: Bug 34029 - Extend datatypes in biblioitems
and deletedbiblioitems tables to avoid import errors
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: BLOB/TEXT column
'publishercode' used in key specification without a key length at
/usr/share/koha/lib/C4/Installer.pm line 741
Updated biblioitems.place to text
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: BLOB/TEXT column
'publishercode' used in key specification without a key length at
/usr/share/koha/lib/C4/Installer.pm line 741
Updated deletedbiblioitems.place to text
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: BLOB/TEXT column
'publishercode' used in key specification without a key length at
/usr/share/koha/lib/C4/Installer.pm line 741

=====

I checked both tables and the column is there:



=========


mysql> show columns from biblioitems;
+-----------------------+--------------+------+-----+-------------------+-----------------------------------------------+
| Field                 | Type         | Null | Key | Default           | Extra
                                        |
+-----------------------+--------------+------+-----+-------------------+-----------------------------------------------+
| biblioitemnumber      | int          | NO   | PRI | NULL              |
auto_increment                                |
| biblionumber          | int          | NO   | MUL | 0                 |      
                                        |
| volume                | longtext     | YES  |     | NULL              |      
                                        |
| number                | longtext     | YES  |     | NULL              |      
                                        |
| itemtype              | varchar(10)  | YES  | MUL | NULL              |      
                                        |
| isbn                  | longtext     | YES  | MUL | NULL              |      
                                        |
| issn                  | longtext     | YES  | MUL | NULL              |      
                                        |
| ean                   | longtext     | YES  | MUL | NULL              |      
                                        |
| publicationyear       | mediumtext   | YES  |     | NULL              |      
                                        |
| publishercode         | varchar(255) | YES  | MUL | NULL              |      
                                        |
| volumedate            | date         | YES  |     | NULL              |      
                                        |
| volumedesc            | mediumtext   | YES  |     | NULL              |      
                                        |
| collectiontitle       | longtext     | YES  |     | NULL              |      
                                        |
| collectionissn        | mediumtext   | YES  |     | NULL              |      
                                        |
| collectionvolume      | longtext     | YES  |     | NULL              |      
                                        |
| editionstatement      | mediumtext   | YES  |     | NULL              |      
                                        |
| editionresponsibility | mediumtext   | YES  |     | NULL              |      
                                        |
| timestamp             | timestamp    | NO   | MUL | CURRENT_TIMESTAMP |
DEFAULT_GENERATED on update CURRENT_TIMESTAMP |
| illus                 | varchar(255) | YES  |     | NULL              |      
                                        |
| pages                 | varchar(255) | YES  |     | NULL              |      
                                        |
| notes                 | longtext     | YES  |     | NULL              |      
                                        |
| size                  | varchar(255) | YES  |     | NULL              |      
                                        |
| place                 | text         | YES  |     | NULL              |      
                                        |
| lccn                  | longtext     | YES  |     | NULL              |      
                                        |
| url                   | mediumtext   | YES  |     | NULL              |      
                                        |
| cn_source             | varchar(10)  | YES  |     | NULL              |      
                                        |
| cn_class              | varchar(30)  | YES  |     | NULL              |      
                                        |
| cn_item               | varchar(10)  | YES  |     | NULL              |      
                                        |
| cn_suffix             | varchar(10)  | YES  |     | NULL              |      
                                        |
| cn_sort               | varchar(255) | YES  |     | NULL              |      
                                        |
| agerestriction        | varchar(255) | YES  |     | NULL              |      
                                        |
| totalissues           | int          | YES  |     | NULL              |      
                                        |
+-----------------------+--------------+------+-----+-------------------+-----------------------------------------------+
32 rows in set (0.00 sec)

mysql>



mysql> show columns from deletedbiblioitems;
+-----------------------+--------------+------+-----+-------------------+-----------------------------------------------+
| Field                 | Type         | Null | Key | Default           | Extra
                                        |
+-----------------------+--------------+------+-----+-------------------+-----------------------------------------------+
| biblioitemnumber      | int          | NO   | PRI | 0                 |      
                                        |
| biblionumber          | int          | NO   | MUL | 0                 |      
                                        |
| volume                | longtext     | YES  |     | NULL              |      
                                        |
| number                | longtext     | YES  |     | NULL              |      
                                        |
| itemtype              | varchar(10)  | YES  | MUL | NULL              |      
                                        |
| isbn                  | longtext     | YES  | MUL | NULL              |      
                                        |
| issn                  | longtext     | YES  |     | NULL              |      
                                        |
| ean                   | longtext     | YES  | MUL | NULL              |      
                                        |
| publicationyear       | mediumtext   | YES  |     | NULL              |      
                                        |
| publishercode         | varchar(255) | YES  | MUL | NULL              |      
                                        |
| volumedate            | date         | YES  |     | NULL              |      
                                        |
| volumedesc            | mediumtext   | YES  |     | NULL              |      
                                        |
| collectiontitle       | longtext     | YES  |     | NULL              |      
                                        |
| collectionissn        | mediumtext   | YES  |     | NULL              |      
                                        |
| collectionvolume      | longtext     | YES  |     | NULL              |      
                                        |
| editionstatement      | mediumtext   | YES  |     | NULL              |      
                                        |
| editionresponsibility | mediumtext   | YES  |     | NULL              |      
                                        |
| timestamp             | timestamp    | NO   | MUL | CURRENT_TIMESTAMP |
DEFAULT_GENERATED on update CURRENT_TIMESTAMP |
| illus                 | varchar(255) | YES  |     | NULL              |      
                                        |
| pages                 | varchar(255) | YES  |     | NULL              |      
                                        |
| notes                 | longtext     | YES  |     | NULL              |      
                                        |
| size                  | varchar(255) | YES  |     | NULL              |      
                                        |
| place                 | text         | YES  |     | NULL              |      
                                        |
| lccn                  | longtext     | YES  |     | NULL              |      
                                        |
| url                   | mediumtext   | YES  |     | NULL              |      
                                        |
| cn_source             | varchar(10)  | YES  |     | NULL              |      
                                        |
| cn_class              | varchar(30)  | YES  |     | NULL              |      
                                        |
| cn_item               | varchar(10)  | YES  |     | NULL              |      
                                        |
| cn_suffix             | varchar(10)  | YES  |     | NULL              |      
                                        |
| cn_sort               | varchar(255) | YES  |     | NULL              |      
                                        |
| agerestriction        | varchar(255) | YES  |     | NULL              |      
                                        |
| totalissues           | int          | YES  |     | NULL              |      
                                        |
+-----------------------+--------------+------+-----+-------------------+-----------------------------------------------+
32 rows in set (0.01 sec)

mysql>



=========



I also looked at the code from file '/usr/share/koha/lib/C4/Installer.pm' on
line 741 (last line) which is displayed below:


======

 try {
 736         my $schema = Koha::Database->new->schema;
 737         $schema->txn_do(
 738             sub {
 739                 $db_rev->{up}->( { dbh => $schema->storage->dbh, out =>
$outfh } );
 740             }
 741         );


======


A quick Google search took me to this page:

https://stackoverflow.com/questions/1827063/mysql-error-key-specification-without-a-key-length

Based on the response, it has something to do with converting (or attempting)
the data type for this particular column. The response from the link above says
the varchar data type on the column should have an explicit character limit
which it seems to have it set, from the show columns statement above.

Any help would be greatly appreciated.

Thanks,

Victor

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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