Skip to content

Commit

Permalink
change metaData_values.value from char(255) to varchar(1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddelikat committed Feb 10, 2012
1 parent 2ac222f commit ed6594f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/changelog/8.x.x.txt
@@ -1,4 +1,5 @@
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.
Expand Down
4 changes: 4 additions & 0 deletions docs/gotcha.txt
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions share/upgrades/7.10.24-8.0.0/extendMetadataValue.sql
@@ -0,0 +1 @@
alter table metaData_values modify value varchar(1024);
30 changes: 28 additions & 2 deletions t/Asset/AssetMetaData.t
Expand Up @@ -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});
Expand Down Expand Up @@ -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');

####################################################
#
Expand Down Expand Up @@ -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(
{
Expand Down

0 comments on commit ed6594f

Please sign in to comment.