FIX: The name changes if the top function changes

This commit is contained in:
Daniel Waterworth 2020-09-07 20:05:22 +01:00
parent 49a76c9edb
commit 0e7e51ae08
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class FixQueryIds < ActiveRecord::Migration[6.0]
SQL
# insert additional_conflicts to temporary table
new_id = DB.query("select greatest(max(id), 1) from tmp_data_explorer_queries").first.max + 1
new_id = DB.query("select greatest(max(id), 1) from tmp_data_explorer_queries").first.greatest + 1
additional_conflicts.each do |conflict_id|
DB.exec <<-SQL
INSERT INTO tmp_data_explorer_queries(id, name, description, sql, user_id, last_run_at, hidden, created_at, updated_at)