blob: 7a02c8a16d658024134e6963218c48271406532a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
module Gitlab
module Database
module SchemaValidation
class Runner
def initialize(structure_sql, database, validators: Validators::BaseValidator.all_validators)
@structure_sql = structure_sql
@database = database
@validators = validators
end
def execute
validators.flat_map { |c| c.new(structure_sql, database).execute }
end
private
attr_reader :structure_sql, :database, :validators
end
end
end
end
|