Module: Gitlab::Database::DynamicModelHelpers

Included in:
PartitioningMigrationHelpers::BackfillPartitionedTable, PartitioningMigrationHelpers::TableManagementHelpers
Defined in:
lib/gitlab/database/dynamic_model_helpers.rb

Instance Method Summary collapse

Instance Method Details

#define_batchable_model(table_name) ⇒ Object


6
7
8
9
10
11
12
13
# File 'lib/gitlab/database/dynamic_model_helpers.rb', line 6

def define_batchable_model(table_name)
  Class.new(ActiveRecord::Base) do
    include EachBatch

    self.table_name = table_name
    self.inheritance_column = :_type_disabled
  end
end