Database fixes related to Rails 7.1
What does this MR do and why?
- https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/rails_upgrade/
- Move test fixes out of the Rails 7.1 Upgrade MR (#475085 - closed)
Changes
- Exclude pending migration connection from reestablished connections
- Fix spec/services/loose_foreign_keys/partition_cleaner_service_spec.rb
- Use ActiveRecord::SchemaMigration.versions instead of all_versions
- Fix ee/spec/models/users_security_dashboard_project_spec.rb
- Ignore id_value for Ci::Build spec
- Fix BulkInsertSafe module for composite keys
- Use connection.schema_migration instead of ActiveRecord::SchemaMigration
- Database indexes: columns and include are seperate fields now
- Explicitly define primary key for Geo::TrackingBase
- Rename rails/generators/testing/behaviour -> rails/generators/testing/behavior
- Explicitly state returning columns for p_ci_builds
- Fix database patch
- Use internal_metadata object instead of InternalMetadata class
- Rename all_versions -> version for schema_migrations