refactor: Port away from changeColumn

Replace by the drop-in replacement modifyColumn

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
pull/55086/head
Carl Schwan 2025-09-12 18:05:19 +07:00
parent 5f1066663e
commit 0e7d5dce1c
5 changed files with 9 additions and 34 deletions

@ -234,7 +234,7 @@ class Version1004Date20170825134824 extends SimpleMigrationStep {
$table->addUniqueIndex(['principaluri', 'uri'], 'calendars_index'); $table->addUniqueIndex(['principaluri', 'uri'], 'calendars_index');
} else { } else {
$table = $schema->getTable('calendars'); $table = $schema->getTable('calendars');
$table->changeColumn('components', [ $table->modifyColumn('components', [
'notnull' => false, 'notnull' => false,
'length' => 64, 'length' => 64,
]); ]);
@ -324,7 +324,7 @@ class Version1004Date20170825134824 extends SimpleMigrationStep {
$table->addUniqueIndex(['principaluri', 'uri'], 'calsub_index'); $table->addUniqueIndex(['principaluri', 'uri'], 'calsub_index');
} else { } else {
$table = $schema->getTable('calendarsubscriptions'); $table = $schema->getTable('calendarsubscriptions');
$table->changeColumn('lastmodified', [ $table->modifyColumn('lastmodified', [
'notnull' => false, 'notnull' => false,
'unsigned' => true, 'unsigned' => true,
]); ]);

@ -103,7 +103,7 @@ class Version1011Date20200630192246 extends SimpleMigrationStep {
$table->addUniqueIndex(['mount_id', 'key'], 'config_mount_key'); $table->addUniqueIndex(['mount_id', 'key'], 'config_mount_key');
} else { } else {
$table = $schema->getTable('external_config'); $table = $schema->getTable('external_config');
$table->changeColumn('value', [ $table->modifyColumn('value', [
'notnull' => false, 'notnull' => false,
'length' => 4000, 'length' => 4000,
]); ]);

@ -27,7 +27,7 @@ class Version2200Date20210805101925 extends SimpleMigrationStep {
if ($schema->hasTable('flow_operations')) { if ($schema->hasTable('flow_operations')) {
$table = $schema->getTable('flow_operations'); $table = $schema->getTable('flow_operations');
$table->changeColumn('name', [ $table->modifyColumn('name', [
'notnull' => false, 'notnull' => false,
]); ]);
} }

@ -916,12 +916,6 @@
<code><![CDATA[execute]]></code> <code><![CDATA[execute]]></code>
</DeprecatedMethod> </DeprecatedMethod>
</file> </file>
<file src="apps/dav/lib/Migration/Version1004Date20170825134824.php">
<DeprecatedMethod>
<code><![CDATA[changeColumn]]></code>
<code><![CDATA[changeColumn]]></code>
</DeprecatedMethod>
</file>
<file src="apps/dav/lib/Migration/Version1008Date20181105104826.php"> <file src="apps/dav/lib/Migration/Version1008Date20181105104826.php">
<DeprecatedMethod> <DeprecatedMethod>
<code><![CDATA[execute]]></code> <code><![CDATA[execute]]></code>
@ -1482,11 +1476,6 @@
<code><![CDATA[login]]></code> <code><![CDATA[login]]></code>
</InvalidReturnType> </InvalidReturnType>
</file> </file>
<file src="apps/files_external/lib/Migration/Version1011Date20200630192246.php">
<DeprecatedMethod>
<code><![CDATA[changeColumn]]></code>
</DeprecatedMethod>
</file>
<file src="apps/files_external/lib/Migration/Version1015Date20211104103506.php"> <file src="apps/files_external/lib/Migration/Version1015Date20211104103506.php">
<DeprecatedMethod> <DeprecatedMethod>
<code><![CDATA[execute]]></code> <code><![CDATA[execute]]></code>
@ -2813,11 +2802,6 @@
<code><![CDATA[bool]]></code> <code><![CDATA[bool]]></code>
</InvalidReturnType> </InvalidReturnType>
</file> </file>
<file src="apps/workflowengine/lib/Migration/Version2200Date20210805101925.php">
<DeprecatedMethod>
<code><![CDATA[changeColumn]]></code>
</DeprecatedMethod>
</file>
<file src="apps/workflowengine/lib/Service/Logger.php"> <file src="apps/workflowengine/lib/Service/Logger.php">
<DeprecatedMethod> <DeprecatedMethod>
<code><![CDATA[getAppValue]]></code> <code><![CDATA[getAppValue]]></code>
@ -3234,15 +3218,6 @@
<code><![CDATA[execute]]></code> <code><![CDATA[execute]]></code>
</DeprecatedMethod> </DeprecatedMethod>
</file> </file>
<file src="core/Migrations/Version21000Date20201120141228.php">
<DeprecatedMethod>
<code><![CDATA[changeColumn]]></code>
<code><![CDATA[changeColumn]]></code>
<code><![CDATA[changeColumn]]></code>
<code><![CDATA[changeColumn]]></code>
<code><![CDATA[changeColumn]]></code>
</DeprecatedMethod>
</file>
<file src="core/Service/LoginFlowV2Service.php"> <file src="core/Service/LoginFlowV2Service.php">
<DeprecatedClass> <DeprecatedClass>
<code><![CDATA[IToken::DO_NOT_REMEMBER]]></code> <code><![CDATA[IToken::DO_NOT_REMEMBER]]></code>

@ -24,16 +24,16 @@ class Version21000Date20201120141228 extends SimpleMigrationStep {
if ($loginNameColumn->getLength() !== 255) { if ($loginNameColumn->getLength() !== 255) {
$loginNameColumn->setLength(255); $loginNameColumn->setLength(255);
} }
$table->changeColumn('type', [ $table->modifyColumn('type', [
'notnull' => false, 'notnull' => false,
]); ]);
$table->changeColumn('remember', [ $table->modifyColumn('remember', [
'notnull' => false, 'notnull' => false,
]); ]);
$table->changeColumn('last_activity', [ $table->modifyColumn('last_activity', [
'notnull' => false, 'notnull' => false,
]); ]);
$table->changeColumn('last_check', [ $table->modifyColumn('last_check', [
'notnull' => false, 'notnull' => false,
]); ]);
} }
@ -51,7 +51,7 @@ class Version21000Date20201120141228 extends SimpleMigrationStep {
if ($schema->hasTable('jobs')) { if ($schema->hasTable('jobs')) {
$table = $schema->getTable('jobs'); $table = $schema->getTable('jobs');
$table->changeColumn('execution_duration', [ $table->modifyColumn('execution_duration', [
'notnull' => false, 'notnull' => false,
'default' => 0, 'default' => 0,
]); ]);