9
10
11
12
13
14
15
16
17
18
|
# File 'lib/active_graph/migrations/schema.rb', line 9
def synchronize_schema_data(schema_data, remove_missing)
queries =
ActiveGraph::Base.read_transaction do
drop_and_create_queries(fetch_constraints_descriptions, schema_data[:constraints], 'CONSTRAINT', remove_missing) +
drop_and_create_queries(fetch_indexes_descriptions, schema_data[:indexes], 'INDEX', remove_missing)
end
ActiveGraph::Base.write_transaction do
queries.each(&ActiveGraph::Base.method(:query))
end
end
|