Can't restore database because migration in the database was in the (missing) discourse-ai plugin

I’m trying to migrate a database and am getting

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

rake db:migrate:status shows

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

And I can see \./db/migrate/20240307231053_add_topics_unread_when_closed_to_user_options.rb in the path, so it seems that the above error is keeping the database from migrating, which is keeping me from restoring a database.

pgvector is installed and enabled on the developmetn and test databases, which was my only guess. . .

This probably is about migrations by discourse-ai, not core.

So not on production?

What does SELECT * FROM pg_extension WHERE extname = 'vector'; tell you?

4 Likes

Aha. I needed to add the AI plugin which is on the system that generated the backup but not on the development system.

It took me another minute, but that was the clue I needed.

Thanks so very much! :beer:

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.