Class: Database::BatchedBackgroundMigrationsFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/database/batched_background_migrations_finder.rb

Constant Summary collapse

RETURNED_MIGRATIONS =
20

Instance Method Summary collapse

Constructor Details

#initialize(connection:) ⇒ BatchedBackgroundMigrationsFinder

Returns a new instance of BatchedBackgroundMigrationsFinder.



7
8
9
# File 'app/finders/database/batched_background_migrations_finder.rb', line 7

def initialize(connection:)
  @connection = connection
end

Instance Method Details

#executeObject



11
12
13
# File 'app/finders/database/batched_background_migrations_finder.rb', line 11

def execute
  batched_migration_class.ordered_by_created_at_desc.for_gitlab_schema(schema).limit(RETURNED_MIGRATIONS)
end