Permalink
Browse files

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

  • Loading branch information...
1 parent 2ac222f commit ed6594fcb79bbad9aaab75a4712f3c478293dc06 @daviddelikat daviddelikat committed Feb 10, 2012
Showing with 34 additions and 2 deletions.
  1. +1 −0 docs/changelog/8.x.x.txt
  2. +4 −0 docs/gotcha.txt
  3. +1 −0 share/upgrades/7.10.24-8.0.0/extendMetadataValue.sql
  4. +28 −2 t/Asset/AssetMetaData.t
View
1 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.
View
4 docs/gotcha.txt
@@ -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
1 share/upgrades/7.10.24-8.0.0/extendMetadataValue.sql
@@ -0,0 +1 @@
+alter table metaData_values modify value varchar(1024);
View
30 t/Asset/AssetMetaData.t
@@ -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(
{

0 comments on commit ed6594f

Please sign in to comment.