Class: Gitlab::BackgroundMigration::LinkLfsObjectsProjects::LfsObjectsProject

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
EachBatch
Defined in:
lib/gitlab/background_migration/link_lfs_objects_projects.rb

Overview

Model specifically used for migration.

Class Method Summary collapse

Class Method Details

.linkableObject


13
14
15
16
17
18
19
20
21
22
23
# File 'lib/gitlab/background_migration/link_lfs_objects_projects.rb', line 13

def self.linkable
  where(
    <<~SQL
      lfs_objects_projects.project_id IN (
        SELECT fork_network_members.forked_from_project_id
        FROM fork_network_members
        WHERE fork_network_members.forked_from_project_id IS NOT NULL
      )
    SQL
  )
end