[Koha-bugs] [Bug 10215] Increase the size of opacnote and librariannote for table subscriptionhistory

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 31 20:03:37 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10215

Galen Charlton <gmcharlt at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA
                 CC|                            |gmcharlt at gmail.com

--- Comment #5 from Galen Charlton <gmcharlt at gmail.com> ---
Alas, it can't be quite that simple -- MySQL doesn't allow default values for
text and blob columns:

mysql> ALTER TABLE subscriptionhistory CHANGE librariannote librariannote TEXT
NOT NULL DEFAULT '';
Query OK, 1 row affected, 1 warning (0.15 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> show warnings;
+---------+------+-------------------------------------------------------------+
| Level   | Code | Message                                                    
|
+---------+------+-------------------------------------------------------------+
| Warning | 1101 | BLOB/TEXT column 'librariannote' can't have a default value
|
+---------+------+-------------------------------------------------------------+
1 row in set (0.00 sec)

Admittedly, by default this is just a warning; MySQL will blithely supply a
default value (of '') for text columns.  However, if we ever feel inspired to
turn on stricter modes like STRICT_TRANS_TABLES (which I believe MariaDB does
by default), problems will occur.

I think making those two columns TEXT (and nullable) is the way to go.  There
might be a bit of additional code warranted to make sure that the Apache error
log doesn't display spurious warnings about undef opacnote and librariannote.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list