Commit 6f343281 authored by Patrick Bair's avatar Patrick Bair

Merge branch 'remove-column-ignores-for-migrated-pk-2' into 'master'

Remove column ignore rules for migrated PKs

See merge request gitlab-org/gitlab!72161
parents e28bf200 27c9a5e7
......@@ -10,7 +10,6 @@ module Ci
include Presentable
include Importable
include Ci::HasRef
include IgnorableColumns
BuildArchivedError = Class.new(StandardError)
......@@ -70,9 +69,6 @@ module Ci
delegate :gitlab_deploy_token, to: :project
delegate :trigger_short_token, to: :trigger_request, allow_nil: true
ignore_columns :id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
ignore_columns :stage_id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
##
# Since Gitlab 11.5, deployments records started being created right after
# `ci_builds` creation. We can look up a relevant `environment` through
......
......@@ -37,8 +37,6 @@ module Ci
job_timeout_source: 4
}
ignore_column :build_id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
ignore_columns :id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
ignore_columns :runner_features, remove_with: '14.7', remove_after: '2021-11-22'
def update_timeout_state
......
......@@ -3,7 +3,6 @@
module Ci
class BuildNeed < Ci::ApplicationRecord
include BulkInsertSafe
include IgnorableColumns
belongs_to :build, class_name: "Ci::Processable", foreign_key: :build_id, inverse_of: :needs
......@@ -13,12 +12,5 @@ module Ci
scope :scoped_build, -> { where('ci_builds.id=ci_build_needs.build_id') }
scope :artifacts, -> { where(artifacts: true) }
# TODO: Remove once build_id_convert_to_bigint is not an "ignored" column anymore (see .ignore_columns above)
# There is a database-side trigger to populate this column. This is unexpected in the context
# of cloning an instance, e.g. when retrying the job. Hence we exclude the ignored column explicitly here.
def attributes
super.except('build_id_convert_to_bigint')
end
end
end
......@@ -4,8 +4,6 @@ module Ci
# The purpose of this class is to store Build related runner session.
# Data will be removed after transitioning from running to any state.
class BuildRunnerSession < Ci::ApplicationRecord
include IgnorableColumns
TERMINAL_SUBPROTOCOL = 'terminal.gitlab.com'
DEFAULT_SERVICE_NAME = 'build'
DEFAULT_PORT_NAME = 'default_port'
......
......@@ -7,7 +7,6 @@ module Ci
include ::Checksummable
include ::Gitlab::ExclusiveLeaseHelpers
include ::Gitlab::OptimisticLocking
include IgnorableColumns
belongs_to :build, class_name: "Ci::Build", foreign_key: :build_id
......
......@@ -10,9 +10,6 @@ module Ci
include Artifactable
include FileStoreMounter
include EachBatch
include IgnorableColumns
ignore_columns %i[id_convert_to_bigint job_id_convert_to_bigint], remove_with: '14.5', remove_after: '2021-11-22'
TEST_REPORT_FILE_TYPES = %w[junit].freeze
COVERAGE_REPORT_FILE_TYPES = %w[cobertura].freeze
......
......@@ -4,9 +4,6 @@ module Ci
module Sources
class Pipeline < Ci::ApplicationRecord
include Ci::NamespacedModelName
include IgnorableColumns
ignore_columns 'source_job_id_convert_to_bigint', remove_with: '14.5', remove_after: '2021-11-22'
self.table_name = "ci_sources_pipelines"
......
......@@ -6,7 +6,6 @@ module Ci
include Ci::HasStatus
include Gitlab::OptimisticLocking
include Presentable
include IgnorableColumns
enum status: Ci::HasStatus::STATUSES_ENUM
......
......@@ -8,7 +8,6 @@ class Deployment < ApplicationRecord
include Importable
include Gitlab::Utils::StrongMemoize
include FastDestroyAll
include IgnorableColumns
StatusUpdateError = Class.new(StandardError)
StatusSyncError = Class.new(StandardError)
......
......@@ -9,9 +9,6 @@ class Event < ApplicationRecord
include Gitlab::Utils::StrongMemoize
include UsageStatistics
include ShaAttribute
include IgnorableColumns
ignore_columns :id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
default_scope { reorder(nil) } # rubocop:disable Cop/DefaultScope
......
......@@ -2,9 +2,6 @@
class PushEventPayload < ApplicationRecord
extend SuppressCompositePrimaryKeyWarning
include IgnorableColumns
ignore_columns :event_id_convert_to_bigint, remove_with: '14.4', remove_after: '2021-10-22'
include ShaAttribute
......
......@@ -9,7 +9,3 @@ ActsAsTaggableOn.tags_counter = false
# validate that counter cache is disabled
raise "Counter cache is not disabled" if
ActsAsTaggableOn::Tagging.reflections["tag"].options[:counter_cache]
ActsAsTaggableOn::Tagging.include IgnorableColumns
ActsAsTaggableOn::Tagging.ignore_column :id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
ActsAsTaggableOn::Tagging.ignore_column :taggable_id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
......@@ -5,7 +5,6 @@ module Geo
include Geo::Model
include Geo::Eventable
include BulkInsertSafe
include IgnorableColumns
belongs_to :job_artifact, class_name: 'Ci::JobArtifact'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment