Files
nc-talk-ai/lib/Migration/Version020800Date20251130000000.php
T
Pascal Kienast 0739d3da6a Initial open-source release of Talk AI
Talk AI is a multi-bot AI assistant manager for Nextcloud Talk:
per-bot prompts and models, agentic tool calling (MCP + built-in
tools), RAG over Nextcloud files, room-document search, vision and
speech-to-text attachments, persistent bot wikis, approval workflows,
rate limiting, and multi-provider LLM support (any OpenAI-compatible
endpoint).

Developed within EDUC - the European Digital UniverCity
(https://educalliance.eu), where it runs as the 'EDUC AI' assistant on
the alliance-wide Nextcloud portal. This public repository is the
upstream point of truth; deployment-specific tools plug in via the
tool-provider extension point (docs/TOOL_PROVIDERS.md).

License: AGPL-3.0-or-later.
2026-07-08 21:13:13 +02:00

48 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\EducAI\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
/**
* Add built_in_tool_name column to educai_bot_tools table.
*
* This allows storing either:
* - tool_id (integer) for MCP tools from the tools table
* - built_in_tool_name (string) for built-in tools like catalogue_search_courses
*
* One of the two columns should be set for each row.
*/
class Version020800Date20251130000000 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if ($schema->hasTable('educai_bot_tools')) {
$table = $schema->getTable('educai_bot_tools');
// Add built_in_tool_name column for built-in tools
if (!$table->hasColumn('built_in_tool_name')) {
$table->addColumn('built_in_tool_name', 'string', [
'notnull' => false,
'length' => 100,
'default' => null,
]);
}
// Make tool_id nullable since we now support either tool_id OR built_in_tool_name
if ($table->hasColumn('tool_id')) {
$column = $table->getColumn('tool_id');
$column->setNotnull(false);
}
}
return $schema;
}
}