Files
nuqloud-ai/lib/Migration/Version024001Date20260903000000.php

35 lines
824 B
PHP

<?php
declare(strict_types=1);
namespace OCA\EducAI\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version024001Date20260903000000 extends SimpleMigrationStep {
/**
* @param Closure(): ISchemaWrapper $schemaClosure
* @param array<string,mixed> $options
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
$schema = $schemaClosure();
if (!$schema->hasTable('educai_tool_confirmations')) {
return $schema;
}
$table = $schema->getTable('educai_tool_confirmations');
if (!$table->hasColumn('talk_message_id')) {
$table->addColumn('talk_message_id', Types::BIGINT, [
'notnull' => false,
'unsigned' => true,
]);
}
return $schema;
}
}