diff --git a/CHANGELOG.md b/CHANGELOG.md index f5dc5d94..2552e5bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ### Changed - Update bundled DataTables to v3.0.3 and remove the jQuery dependency. +- Store report option data as longtext instead of varchar(1000). ### Fixed - Preserve spreadsheet dates with month and minute format tokens correctly #589. diff --git a/lib/Migration/Version3007Date20211003180000.php b/lib/Migration/Version3007Date20211003180000.php index 32539dfb..905f1211 100644 --- a/lib/Migration/Version3007Date20211003180000.php +++ b/lib/Migration/Version3007Date20211003180000.php @@ -111,17 +111,14 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt 'notnull' => false, 'length' => 64, ]); - $table->addColumn('chartoptions', 'string', [ + $table->addColumn('chartoptions', 'text', [ 'notnull' => false, - 'length' => 1000, ]); - $table->addColumn('dataoptions', 'string', [ + $table->addColumn('dataoptions', 'text', [ 'notnull' => false, - 'length' => 1000, ]); - $table->addColumn('filteroptions', 'string', [ + $table->addColumn('filteroptions', 'text', [ 'notnull' => false, - 'length' => 1000, ]); $table->addColumn('refresh', 'integer', [ 'notnull' => false, diff --git a/lib/Migration/Version4010Date20230815200000.php b/lib/Migration/Version4010Date20230815200000.php index a8e4c3df..e5718162 100644 --- a/lib/Migration/Version4010Date20230815200000.php +++ b/lib/Migration/Version4010Date20230815200000.php @@ -38,11 +38,10 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table = $schema->getTable('analytics_report'); if (!$table->hasColumn('tableoptions')) { - $table->addColumn('tableoptions', 'string', [ + $table->addColumn('tableoptions', 'text', [ 'notnull' => false, - 'length' => 1000, ]); } return $schema; } -} \ No newline at end of file +} diff --git a/lib/Migration/Version7000Date20260903100000.php b/lib/Migration/Version7000Date20260903100000.php new file mode 100644 index 00000000..6dcdfdc1 --- /dev/null +++ b/lib/Migration/Version7000Date20260903100000.php @@ -0,0 +1,33 @@ +getTable('analytics_report'); + foreach (['chartoptions', 'dataoptions', 'filteroptions', 'tableoptions'] as $column) { + $table->changeColumn($column, [ + 'type' => 'text', + 'notnull' => false, + ]); + } + + return $schema; + } +}