mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: remove all calls to SqlBuilder use DB.build instead
This is part of the migration to mini_sql, SqlBuilder.new is being deprecated and replaced with DB.build
This commit is contained in:
@@ -32,21 +32,22 @@ module Migration
|
||||
end
|
||||
|
||||
def droppable?
|
||||
builder = SqlBuilder.new(<<~SQL)
|
||||
builder = DB.build(<<~SQL)
|
||||
SELECT 1
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
/*where*/
|
||||
LIMIT 1
|
||||
SQL
|
||||
|
||||
builder.where("table_schema = 'public'")
|
||||
builder
|
||||
.where("table_schema = 'public'")
|
||||
.where("table_name = :table")
|
||||
.where("column_name IN (:columns)")
|
||||
.where(previous_migration_done)
|
||||
.exec(table: @table,
|
||||
columns: @columns,
|
||||
delay: "#{@delay} seconds",
|
||||
after_migration: @after_migration).to_a.length > 0
|
||||
after_migration: @after_migration) > 0
|
||||
end
|
||||
|
||||
def execute_drop!
|
||||
|
Reference in New Issue
Block a user