From 274513b3b9c13abd4b611138229286fcc042c250 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Sun, 27 Oct 2024 16:46:37 +0100 Subject: [PATCH] refs #309 make encoded_icon columns larger Signed-off-by: Julien Veyssier --- appinfo/info.xml | 2 +- .../Version030003Date20241027164309.php | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 lib/Migration/Version030003Date20241027164309.php diff --git a/appinfo/info.xml b/appinfo/info.xml index 4500aa152..1949d0a68 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -3,7 +3,7 @@ cospend Cospend - 3.0.2 + 3.0.3 agpl Julien Veyssier Cospend diff --git a/lib/Migration/Version030003Date20241027164309.php b/lib/Migration/Version030003Date20241027164309.php new file mode 100644 index 000000000..df576eeb4 --- /dev/null +++ b/lib/Migration/Version030003Date20241027164309.php @@ -0,0 +1,49 @@ +hasTable('cospend_categories')) { + $table = $schema->getTable('cospend_categories'); + if ($table->hasColumn('encoded_icon')) { + $column = $table->getColumn('encoded_icon'); + $column->setLength(256); + $schemaChanged = true; + } + } + + if ($schema->hasTable('cospend_paymentmodes')) { + $table = $schema->getTable('cospend_paymentmodes'); + if ($table->hasColumn('encoded_icon')) { + $column = $table->getColumn('encoded_icon'); + $column->setLength(256); + $schemaChanged = true; + } + } + + return $schemaChanged ? $schema : null; + } +}