无法恢复数据库,因为数据库中的迁移位于(缺失的)discourse-ai 插件中

我正在尝试迁移数据库,但遇到了以下错误:

unknown OID 446656: failed to recognize type of 'embeddings'. It will be treated as String.

rake db:migrate:status 显示:

...
   up     20240304030429  Topic id on incoming email index
   up     20240306063428  Add indexes to notifications
   up     20240307231053  Add topics unread when closed to user options

并且我可以在路径中看到 \./db/migrate/20240307231053_add_topics_unread_when_closed_to_user_options.rb,所以看起来上面的错误阻止了数据库迁移,从而阻止了我恢复数据库。

pgvector 已在开发和测试数据库上安装并启用,这是我唯一的猜测。

这可能与 discourse-ai 的迁移有关,而不是核心。

所以不是生产环境?

SELECT * FROM pg_extension WHERE extname = 'vector'; 告诉你什么?

4 个赞

啊哈。我需要添加备份生成系统上有的但开发系统上没有的 AI 插件。

又花了我一分钟,但这正是我需要的线索。

非常感谢!:beer:

5 个赞

此主题在上次回复后 30 天自动关闭。不再允许回复。