Skip to content

Commit da8485f

Browse files
author
dmitrii.buk
committed
remove redundant locks in migrations
1 parent a92b59a commit da8485f

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

lib/umbrellio_utils/migrations.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def add_columns_to_view(view_name, *sequel_columns)
227227
end
228228

229229
DB.transaction do
230-
DB.run("LOCK TABLE #{view_name}")
231230
definition = view_definition(view_name)
232231
sql = sequel_columns.map { |x| DB.literal(x) }.join(", ")
233232
new_definition = definition.sub("FROM", ", #{sql} FROM")
@@ -239,7 +238,6 @@ def add_columns_to_view(view_name, *sequel_columns)
239238
# drop_columns_from_view("orders_clickhouse_view", "id", "guid")
240239
def drop_columns_from_view(view_name, *columns)
241240
DB.transaction do
242-
DB.run("LOCK TABLE #{view_name}")
243241
definition = view_definition(view_name)
244242
parsed_columns = parse_columns(definition)
245243
parsed_columns.reject! { |name, _| name.in?(columns) }

0 commit comments

Comments
 (0)