[Koha-patches] [PATCH] Bug 5642: Item field serial enumeration (enumchron) should be longer
Ian Walls
ian.walls at bywatersolutions.com
Thu Jan 20 14:11:51 CET 2011
Great idea! We really need more space here for future work with serials.
One critique of this patch: I'd think that
installer/data/mysql/kohastructure.sql would also need to be altered, so
that fresh installations could benefit from this change, as well.
-Ian
On Thu, Jan 20, 2011 at 5:51 AM, Marcel de Rooy <M.de.Rooy at rijksmuseum.nl>wrote:
> Field enumchron in items table is now varchar(80).
> We have records that need a much longer field, even up to 400 or 500 chars.
> I suggest to change its type to TEXT (variable length with max 64K;
> tinytext
> goes up to 255 chars and is just too short).
> Mediumtext or longtext are not needed; as a side note these types are used
> in
> the items table for e.g. booksellerid and more_subfields_xml..
> ---
> installer/data/mysql/updatedatabase.pl | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/installer/data/mysql/updatedatabase.plb/installer/data/mysql/
> updatedatabase.pl
> index 5f3310b..e47f733 100755
> --- a/installer/data/mysql/updatedatabase.pl
> +++ b/installer/data/mysql/updatedatabase.pl
> @@ -3944,6 +3944,13 @@ if (C4::Context->preference("Version") <
> TransformToNum($DBversion)) {
> SetVersion ($DBversion);
> }
>
> +$DBversion = "3.03.00.XXX";
> +if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
> + $dbh->do("ALTER TABLE items MODIFY enumchron TEXT");
> + print "Upgrade to $DBversion done (bug 5642: longer serial
> enumeration)\n";
> + SetVersion ($DBversion);
> +}
> +
> =head1 FUNCTIONS
>
> =head2 DropAllForeignKeys($table)
> --
> 1.6.0.6
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>
--
Ian Walls
Lead Development Specialist
ByWater Solutions
Phone # (888) 900-8944
http://bywatersolutions.com
ian.walls at bywatersolutions.com
Twitter: @sekjal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20110120/e5c6bf6e/attachment.htm>
More information about the Koha-patches
mailing list