Add embeddings to spec migration helpers
What does this MR do and why?
Related to https://gitlab.com/gitlab-org/gitlab/-/issues/411390
Makes migration helpers aware of embeddings DB.
How to set up and validate locally
- create a testing migration spec:
$ cat ee/db/embedding/migrate/20230517080722_test_embedding.rb
# frozen_string_literal: true
class TestEmbedding < Gitlab::Database::Migration[2.1]
def change
add_column :tanuki_bot_mvc, :test_column, :integer
end
end
$ cat ee/spec/migrations/20230517080722_test_embedding_spec.rb
# frozen_string_literal: true
require 'spec_helper'
require_migration!
RSpec.describe TestEmbedding, :embedding do
let(:tanuki_bot_mvc) { table(:tanuki_bot_mvc, database: :embedding) }
it 'runs migration' do
expect { migrate! }.not_to raise_error
end
end
- verify it's executed on embedding database
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.