hasTable('textprocessing_tasks')) { $table = $schema->getTable('textprocessing_tasks'); $column = $table->getColumn('user_id'); $column->setNotnull(false); if (!$table->hasIndex('tp_tasks_uid_appid_ident')) { $table->addIndex(['user_id', 'app_id', 'identifier'], 'tp_tasks_uid_appid_ident'); $changed = true; } } if ($changed) { return $schema; } return null; } }