Bootstrap error with ai plugin, bundle exec rake db:migrate

In my case the database part of Discourse is located on an external server and not part of the standard bundle of Discourse containers. The vector extension must be installed with different permissions compared to the database user for Discourse. Therefore the installation had to be performed manually, not as one step of the bootstrap process.