Files
nc-talk-ai/lib/Migration/Version022100Date20251127000000.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

42 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\EducAI\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
/**
* Data migration: Set all legacy bots (with NULL approval_status) to 'approved'.
* This ensures bots created before the approval workflow feature are treated as approved.
*/
class Version022100Date20251127000000 extends SimpleMigrationStep {
private IDBConnection $connection;
public function __construct(IDBConnection $connection) {
$this->connection = $connection;
}
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
// No schema changes, just data migration
return null;
}
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
$qb = $this->connection->getQueryBuilder();
// Update all bots with NULL approval_status to 'approved'
$qb->update('educai_bots')
->set('approval_status', $qb->createNamedParameter('approved'))
->where($qb->expr()->isNull('approval_status'));
$updated = $qb->executeStatement();
$output->info("Updated {$updated} legacy bots to 'approved' status.");
}
}