From 9b7c7396e715bcc5b169e7d4f3134cab663d07ae Mon Sep 17 00:00:00 2001 From: Rello Date: Mon, 14 Sep 2026 22:01:01 +0200 Subject: [PATCH] Use longtext for report options Signed-off-by: Rello Assisted-by: Codex:GPT-5 --- CHANGELOG.md | 1 + .../Version3007Date20211003180000.php | 9 ++--- .../Version4010Date20230815200000.php | 5 ++- .../Version7000Date20260903100000.php | 33 +++++++++++++++++++ 4 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 lib/Migration/Version7000Date20260903100000.php diff --git a/CHANGELOG.md b/CHANGELOG.md index f5dc5d944..2552e5bbf 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 32539dfba..905f1211f 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 a8e4c3df2..e57181622 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 000000000..6dcdfdc1b --- /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; + } +}