diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0c63951664cc83adb7c3640c4aae1345bb455449..cbf880d1738c346339b86d9216784860f8d2770c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -59,6 +59,7 @@ Views 2.x-dev o #675264 by peck66: Freeform profile list field did not output properly. o #663372 by dan.nsk: Allow tokens to work in the "target" field during link rewriting. o #747418 by dereine: Fix taxonomy term ID bug introduced in #496634. + o #466250 by alex_b and dereine: Enlarge views_display field to prevent heavy displays from losing data. Other changes: o #570558 by yhahn: Segment default views caching to conserve memory used by Views during normal operation. diff --git a/views.install b/views.install index 4431409ea9d34c5fc1f7d1798ab40fcf5728b73e..157e8a5f25beedaa25c4c159242bca98a4d96c50 100644 --- a/views.install +++ b/views.install @@ -184,6 +184,7 @@ function views_schema_6000() { 'description' => 'The order in which this display is loaded.', ), 'display_options' => array( + // Type corrected in update 6009 'type' => 'blob', 'description' => 'A serialized array of options for this display; it contains options that are generally only pertinent to that display plugin type.', 'serialize' => TRUE, @@ -336,7 +337,7 @@ function views_schema_6005() { } function views_update_6005() { $ret = array(); - + $new_field = array( 'type' => 'varchar', 'length' => '64', @@ -360,7 +361,7 @@ function views_schema_6006() { } function views_update_6006() { $ret = array(); - + $table = drupal_get_schema_unprocessed('system', 'cache'); $table['description'] = 'Cache table for views to store pre-rendered queries, results, and display output.'; $table['fields']['serialized']['default'] = 1; @@ -383,3 +384,48 @@ function views_update_6007() { } return $ret; } + +/** + * Add the primary key to views_display table. + */ +function views_schema_6008() { + $schema = views_schema(__FUNCTION__); + $schema['views_display']['primary key'] = array('vid', 'id'); + return $schema; +} + +/** + * Add the primary key to the views_display table. + */ +function views_update_6008() { + $ret = array(); + + db_add_primary_key($ret, 'views_display', array('vid', 'id')); + + return $ret; +} + +/** + * Enlarge the views_display.display_options field to accomodate a larger set + * of configurations (e. g. fields, filters, etc.) on a display. + */ +function views_schema_6009() { + $schema = views_schema(__FUNCTION__); + $schema['views_display']['fields']['display_options'] = array( + 'type' => 'text', + 'size' => 'big', + 'description' => 'A serialized array of options for this display; it contains options that are generally only pertinent to that display plugin type.', + 'serialize' => TRUE, + 'serialized default' => 'a:0:{}', + ); + return $schema; +} + +function views_update_6009() { + $ret = array(); + + $schema = views_schema_6009(); + db_change_field($ret, 'views_display', 'display_options', 'display_options', $schema['views_display']['fields']['display_options']); + + return $ret; +} \ No newline at end of file