From 0e7d5dce1c59b360a82260dbdab814c605c24f04 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 12 Sep 2025 18:05:19 +0200 Subject: [PATCH] refactor: Port away from changeColumn Replace by the drop-in replacement modifyColumn Signed-off-by: Carl Schwan --- .../Version1004Date20170825134824.php | 4 +-- .../Version1011Date20200630192246.php | 2 +- .../Version2200Date20210805101925.php | 2 +- build/psalm-baseline.xml | 25 ------------------- .../Version21000Date20201120141228.php | 10 ++++---- 5 files changed, 9 insertions(+), 34 deletions(-) diff --git a/apps/dav/lib/Migration/Version1004Date20170825134824.php b/apps/dav/lib/Migration/Version1004Date20170825134824.php index 4bf9637b697..ed089861d76 100644 --- a/apps/dav/lib/Migration/Version1004Date20170825134824.php +++ b/apps/dav/lib/Migration/Version1004Date20170825134824.php @@ -234,7 +234,7 @@ class Version1004Date20170825134824 extends SimpleMigrationStep { $table->addUniqueIndex(['principaluri', 'uri'], 'calendars_index'); } else { $table = $schema->getTable('calendars'); - $table->changeColumn('components', [ + $table->modifyColumn('components', [ 'notnull' => false, 'length' => 64, ]); @@ -324,7 +324,7 @@ class Version1004Date20170825134824 extends SimpleMigrationStep { $table->addUniqueIndex(['principaluri', 'uri'], 'calsub_index'); } else { $table = $schema->getTable('calendarsubscriptions'); - $table->changeColumn('lastmodified', [ + $table->modifyColumn('lastmodified', [ 'notnull' => false, 'unsigned' => true, ]); diff --git a/apps/files_external/lib/Migration/Version1011Date20200630192246.php b/apps/files_external/lib/Migration/Version1011Date20200630192246.php index c87b1cfbc8b..dffbd70aa58 100644 --- a/apps/files_external/lib/Migration/Version1011Date20200630192246.php +++ b/apps/files_external/lib/Migration/Version1011Date20200630192246.php @@ -103,7 +103,7 @@ class Version1011Date20200630192246 extends SimpleMigrationStep { $table->addUniqueIndex(['mount_id', 'key'], 'config_mount_key'); } else { $table = $schema->getTable('external_config'); - $table->changeColumn('value', [ + $table->modifyColumn('value', [ 'notnull' => false, 'length' => 4000, ]); diff --git a/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php b/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php index 841277acfce..f924b7ae8ef 100644 --- a/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php +++ b/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php @@ -27,7 +27,7 @@ class Version2200Date20210805101925 extends SimpleMigrationStep { if ($schema->hasTable('flow_operations')) { $table = $schema->getTable('flow_operations'); - $table->changeColumn('name', [ + $table->modifyColumn('name', [ 'notnull' => false, ]); } diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 3082ec0f958..3e5b4f95417 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -916,12 +916,6 @@ - - - - - - @@ -1482,11 +1476,6 @@ - - - - - @@ -2813,11 +2802,6 @@ - - - - - @@ -3234,15 +3218,6 @@ - - - - - - - - - diff --git a/core/Migrations/Version21000Date20201120141228.php b/core/Migrations/Version21000Date20201120141228.php index ac20cbfd577..feba7c469bb 100644 --- a/core/Migrations/Version21000Date20201120141228.php +++ b/core/Migrations/Version21000Date20201120141228.php @@ -24,16 +24,16 @@ class Version21000Date20201120141228 extends SimpleMigrationStep { if ($loginNameColumn->getLength() !== 255) { $loginNameColumn->setLength(255); } - $table->changeColumn('type', [ + $table->modifyColumn('type', [ 'notnull' => false, ]); - $table->changeColumn('remember', [ + $table->modifyColumn('remember', [ 'notnull' => false, ]); - $table->changeColumn('last_activity', [ + $table->modifyColumn('last_activity', [ 'notnull' => false, ]); - $table->changeColumn('last_check', [ + $table->modifyColumn('last_check', [ 'notnull' => false, ]); } @@ -51,7 +51,7 @@ class Version21000Date20201120141228 extends SimpleMigrationStep { if ($schema->hasTable('jobs')) { $table = $schema->getTable('jobs'); - $table->changeColumn('execution_duration', [ + $table->modifyColumn('execution_duration', [ 'notnull' => false, 'default' => 0, ]);