diff --git a/app/models/design_management/design.rb b/app/models/design_management/design.rb index c5c0ca04510e4a95864176b81db8beb004d7e0d9..5b72e8036c7fb8f833d4eb5b8a2bef9e0d4254ac 100644 --- a/app/models/design_management/design.rb +++ b/app/models/design_management/design.rb @@ -16,6 +16,9 @@ class Design < ApplicationRecord include Participable include CacheMarkdownField include Subscribable + include IgnorableColumns + + ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22' cache_markdown_field :description diff --git a/app/models/event.rb b/app/models/event.rb index c046cd81419dc64e70d46a1d9f064259801b7ea4..f56cbe7409dac214ccb5cf5b8f467c380133d4af 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -11,6 +11,9 @@ class Event < ApplicationRecord include ShaAttribute include EachBatch include Import::HasImportSource + include IgnorableColumns + + ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22' ACTIONS = HashWithIndifferentAccess.new( created: 1, diff --git a/app/models/issue.rb b/app/models/issue.rb index 6cc5cb8ca60eee20efad5e35156bc8538326f523..aff368a6fad80a744970910850dd8716a82a9075 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -58,6 +58,7 @@ class Issue < ApplicationRecord # prevent caching this column by rails, as we want to easily remove it after the backfilling ignore_column :tmp_epic_id, remove_with: '16.11', remove_after: '2024-03-31' + ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22' belongs_to :project belongs_to :namespace, inverse_of: :issues diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 6163b378916f594b8125cbb51d7bc101b115ae9e..22431acbb3a24b8fcd6eaaeb09312b7c97dacdd4 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -25,6 +25,7 @@ class MergeRequest < ApplicationRecord include Todoable include Spammable + ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22' ignore_columns :head_pipeline_id_convert_to_bigint, remove_with: '17.1', remove_after: '2024-06-14' extend ::Gitlab::Utils::Override diff --git a/app/models/note.rb b/app/models/note.rb index 010b0b790a7a465fbd47e3195bfa7dbb7a4e7d80..a846e4b176921297b791556827b351d222cd0f80 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -25,6 +25,9 @@ class Note < ApplicationRecord include Sortable include EachBatch include Spammable + include IgnorableColumns + + ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22' cache_markdown_field :note, pipeline: :note, issuable_reference_expansion_enabled: true diff --git a/app/models/resource_label_event.rb b/app/models/resource_label_event.rb index bd3057f37dc4c35d3b2d0aedc35e59a05faf35b3..1ac2320b209e5669fc18cc58a131153a4918fe1a 100644 --- a/app/models/resource_label_event.rb +++ b/app/models/resource_label_event.rb @@ -4,6 +4,9 @@ class ResourceLabelEvent < ResourceEvent include CacheMarkdownField include MergeRequestResourceEvent include Import::HasImportSource + include IgnorableColumns + + ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22' cache_markdown_field :reference diff --git a/app/models/resource_milestone_event.rb b/app/models/resource_milestone_event.rb index ba16a986ce267abee376c1d3eba695a43e52c4ba..4a320ae6047372e56367c7bf93bef82233b52b9c 100644 --- a/app/models/resource_milestone_event.rb +++ b/app/models/resource_milestone_event.rb @@ -3,6 +3,9 @@ class ResourceMilestoneEvent < ResourceTimeboxEvent include EachBatch include Import::HasImportSource + include IgnorableColumns + + ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22' belongs_to :milestone diff --git a/app/models/resource_state_event.rb b/app/models/resource_state_event.rb index 5be6eeef68ac318c7c53037e2644ed28f8a97d83..a35697b5d3b2c7831890306f83645d830f8c4c2f 100644 --- a/app/models/resource_state_event.rb +++ b/app/models/resource_state_event.rb @@ -4,6 +4,9 @@ class ResourceStateEvent < ResourceEvent include MergeRequestResourceEvent include Importable include Import::HasImportSource + include IgnorableColumns + + ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22' validate :exactly_one_issuable, unless: :importing? diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 444c75ca4b7afd812f63ae0a4f92961bc77bde36..73904dc77d8766781939199ee9d65cedf5a85f51 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -13,7 +13,6 @@ class Snippet < ApplicationRecord include Editable include Gitlab::SQL::Pattern include FromUnion - include IgnorableColumns include HasRepository include CanMoveRepositoryStorage include AfterCommitQueue @@ -21,6 +20,9 @@ class Snippet < ApplicationRecord include CreatedAtFilterable include EachBatch include Import::HasImportSource + include IgnorableColumns + + ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22' MAX_FILE_COUNT = 10 diff --git a/lib/gitlab/design_management/copy_design_collection_model_attributes.yml b/lib/gitlab/design_management/copy_design_collection_model_attributes.yml index 2d2ad14bda539fea436bc3826d1b87a8f831b48b..6b17a7d8fd6bace240f755d31a1be98f59e80877 100644 --- a/lib/gitlab/design_management/copy_design_collection_model_attributes.yml +++ b/lib/gitlab/design_management/copy_design_collection_model_attributes.yml @@ -17,7 +17,6 @@ design_attributes: - filename - relative_position - description - - imported version_attributes: - author_id diff --git a/lib/gitlab/legacy_github_import/pull_request_formatter.rb b/lib/gitlab/legacy_github_import/pull_request_formatter.rb index 72adba30093da4539d15a4c9fbf56c9fb2d2b768..10ace7a09f8ccafad2d5aa38aaba3a4a7d45037f 100644 --- a/lib/gitlab/legacy_github_import/pull_request_formatter.rb +++ b/lib/gitlab/legacy_github_import/pull_request_formatter.rb @@ -22,8 +22,7 @@ def attributes author_id: author_id, assignee_id: assignee_id, created_at: raw_data[:created_at], - updated_at: raw_data[:updated_at], - imported: true + updated_at: raw_data[:updated_at] } end diff --git a/spec/lib/gitlab/legacy_github_import/pull_request_formatter_spec.rb b/spec/lib/gitlab/legacy_github_import/pull_request_formatter_spec.rb index 1555e3e0d4c87ab611a78cd47c6c4a05dbd9de64..a437a6b1b571885666cd6628326dc2c7103fb916 100644 --- a/spec/lib/gitlab/legacy_github_import/pull_request_formatter_spec.rb +++ b/spec/lib/gitlab/legacy_github_import/pull_request_formatter_spec.rb @@ -66,8 +66,7 @@ author_id: project.creator_id, assignee_id: nil, created_at: created_at, - updated_at: updated_at, - imported: true + updated_at: updated_at } expect(pull_request.attributes).to eq(expected) @@ -93,8 +92,7 @@ author_id: project.creator_id, assignee_id: nil, created_at: created_at, - updated_at: updated_at, - imported: true + updated_at: updated_at } expect(pull_request.attributes).to eq(expected) @@ -121,8 +119,7 @@ author_id: project.creator_id, assignee_id: nil, created_at: created_at, - updated_at: updated_at, - imported: true + updated_at: updated_at } expect(pull_request.attributes).to eq(expected)