Class: Gitlab::BackgroundMigration::LinkLfsObjectsProjects::ForkNetworkMember

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

.without_lfs_object(lfs_object_id) ⇒ Object


32
33
34
35
36
37
38
39
40
41
42
# File 'lib/gitlab/background_migration/link_lfs_objects_projects.rb', line 32

def self.without_lfs_object(lfs_object_id)
  where(
    <<~SQL
      fork_network_members.project_id NOT IN (
        SELECT lop.project_id
        FROM lfs_objects_projects lop
        WHERE lop.lfs_object_id = #{lfs_object_id}
      )
    SQL
  )
end