change metaData_values.value from char(255) to varchar(1024)

This commit is contained in:
David Delikat 2012-02-10 16:49:19 +00:00
parent 57bef51545
commit c76f12d278
4 changed files with 35 additions and 2 deletions

View file

@ -1,4 +1,6 @@
8.0.0
- #10012 - larger meta data values for multi-value fields
- #12310 - fixed rendering and submit button on user edit/add form
- Replaced the existing caching mechanism with memcached, which results in a 400% improvement to cache speed. See migration.txt for API changes and gotcha.txt for prereq changes.
- Added "hot sessions" so sessions interact with the database less.
- Added Facebook Auth and FacebookLogin macro.

View file

@ -38,6 +38,10 @@ save you many hours of grief.
* Support for server-side spell checking in the Rich Editor TinyMCE has been removed.
* The field metaData_values.value has been changed from 'char(255)' to varchar(1024).
This may be incompatible with some MySQL operations. Please check any custom modules
that access this field.
7.10.24
--------------------------------------------------------------------
* WebGUI now depends on Business::OnlinePayment::AuthorizeNet. This version

View file

@ -0,0 +1 @@
alter table metaData_values modify value varchar(1024);

View file

@ -22,7 +22,7 @@ use WebGUI::Test::Mechanize;
use Test::More; # increment this value for each test you create
use Test::Deep;
plan tests => 25;
plan tests => 26;
my $session = WebGUI::Test->session;
$session->user({userId => 3});
@ -172,7 +172,7 @@ cmp_deeply(
$folder->deleteMetaDataField($byName->{'color'});
$foMetaData = $folder->getMetaDataFields;
$byName = buildNameIndex($foMetaData);
cmp_bag( [keys %{ $byName}], ['sport', 'searchEngine'], 'color meta data field removed');
cmp_bag( [keys %{ $byName}], ['sport', 'searchEngine' ], 'color meta data field removed');
####################################################
#
@ -237,6 +237,32 @@ cmp_deeply(
'getMetaDataAsTemplateVariables returns proper values for folder'
);
####################################################
#
# meta data value field size is 1024 characters
#
####################################################
$folder->addMetaDataField('new', 'bigText', '', 'Text Field', 'text');
# set it; need to update $foMetaData and $byName.
$foMetaData = $folder->getMetaDataFields;
$byName = buildNameIndex($foMetaData);
my $value1024 = 'balderdashagain' x 64; # 16 chars * 64 is 1024 chars
$folder->updateMetaData( $byName->{'bigText'}, $value1024 );
# check that they're equal
cmp_deeply(
$folder->getMetaDataAsTemplateVariables,
{
'book' => '1984',
'sport' => 'underwaterHockey',
'searchEngine' => undef,
'bigText' => $value1024,
},
'meta data value can hold 1024 characters'
);
{
my $asset = $root->addChild(
{