$options */ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { $schema = $schemaClosure(); if ($schema->hasTable('educai_tool_confirmations')) { return $schema; } $table = $schema->createTable('educai_tool_confirmations'); $table->addColumn('id', Types::BIGINT, ['autoincrement' => true, 'notnull' => true, 'unsigned' => true]); $table->addColumn('token', Types::STRING, ['notnull' => true, 'length' => 32]); $table->addColumn('user_id', Types::STRING, ['notnull' => true, 'length' => 64]); $table->addColumn('bot_id', Types::BIGINT, ['notnull' => false, 'unsigned' => true]); $table->addColumn('room_token', Types::STRING, ['notnull' => false, 'length' => 64]); $table->addColumn('tool_name', Types::STRING, ['notnull' => true, 'length' => 128]); $table->addColumn('arguments_hash', Types::STRING, ['notnull' => true, 'length' => 64]); $table->addColumn('expires_at', Types::BIGINT, ['notnull' => true, 'unsigned' => true]); $table->addColumn('created_at', Types::BIGINT, ['notnull' => true, 'unsigned' => true]); $table->setPrimaryKey(['id']); $table->addUniqueIndex(['token'], 'educai_tc_token_u'); $table->addIndex(['user_id', 'expires_at'], 'educai_tc_user_exp_i'); return $schema; } }