Make db:migrate:reset work with GITLAB_USE_MODEL_LOAD_BALANCING=true
The problem was caused by using the the ActsAsTaggableOn::Tagging model directly which has some weird configuration in https://gitlab.com/gitlab-org/gitlab/-/blob/9c2682cf013dae1d469e6c2c6fea3f6d1aa0fa5a/config/initializers/1_acts_as_taggable.rb#L15 which forces the connection to use the CI connection. But this doesn't make sense in the migration context where we are migrating the schema for the `main` database. As such we need to just define a model in the migration like we would normally do then it will use the correct connection for the current migration.
Showing
Please register or sign in to comment