Skip to content

Commit ed6594f

Browse files
committedFeb 10, 2012
change metaData_values.value from char(255) to varchar(1024)
1 parent 2ac222f commit ed6594f

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed
 

‎docs/changelog/8.x.x.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
8.0.0
2+
- #10012 - larger meta data values for multi-value fields
23
- #12310 - fixed rendering and submit button on user edit/add form
34
- 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.
45
- Added "hot sessions" so sessions interact with the database less.

‎docs/gotcha.txt

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ save you many hours of grief.
3838

3939
* Support for server-side spell checking in the Rich Editor TinyMCE has been removed.
4040

41+
* The field metaData_values.value has been changed from 'char(255)' to varchar(1024).
42+
This may be incompatible with some MySQL operations. Please check any custom modules
43+
that access this field.
44+
4145
7.10.24
4246
--------------------------------------------------------------------
4347
* WebGUI now depends on Business::OnlinePayment::AuthorizeNet. This version
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alter table metaData_values modify value varchar(1024);

‎t/Asset/AssetMetaData.t

+28-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use WebGUI::Test::Mechanize;
2222

2323
use Test::More; # increment this value for each test you create
2424
use Test::Deep;
25-
plan tests => 25;
25+
plan tests => 26;
2626

2727
my $session = WebGUI::Test->session;
2828
$session->user({userId => 3});
@@ -172,7 +172,7 @@ cmp_deeply(
172172
$folder->deleteMetaDataField($byName->{'color'});
173173
$foMetaData = $folder->getMetaDataFields;
174174
$byName = buildNameIndex($foMetaData);
175-
cmp_bag( [keys %{ $byName}], ['sport', 'searchEngine'], 'color meta data field removed');
175+
cmp_bag( [keys %{ $byName}], ['sport', 'searchEngine' ], 'color meta data field removed');
176176

177177
####################################################
178178
#
@@ -237,6 +237,32 @@ cmp_deeply(
237237
'getMetaDataAsTemplateVariables returns proper values for folder'
238238
);
239239

240+
####################################################
241+
#
242+
# meta data value field size is 1024 characters
243+
#
244+
####################################################
245+
246+
$folder->addMetaDataField('new', 'bigText', '', 'Text Field', 'text');
247+
248+
# set it; need to update $foMetaData and $byName.
249+
$foMetaData = $folder->getMetaDataFields;
250+
$byName = buildNameIndex($foMetaData);
251+
my $value1024 = 'balderdashagain' x 64; # 16 chars * 64 is 1024 chars
252+
$folder->updateMetaData( $byName->{'bigText'}, $value1024 );
253+
254+
# check that they're equal
255+
cmp_deeply(
256+
$folder->getMetaDataAsTemplateVariables,
257+
{
258+
'book' => '1984',
259+
'sport' => 'underwaterHockey',
260+
'searchEngine' => undef,
261+
'bigText' => $value1024,
262+
},
263+
'meta data value can hold 1024 characters'
264+
);
265+
240266
{
241267
my $asset = $root->addChild(
242268
{

0 commit comments

Comments
 (0)
Please sign in to comment.