From 4bbed0c5f317080d7c95ec13fc3cd1e0822f0a2f Mon Sep 17 00:00:00 2001 From: Oleh Fedorenko Date: Thu, 19 Oct 2023 14:28:29 +0000 Subject: [PATCH] Ruby 3.0 fixes --- db/migrate/20150525081931_remove_duplicate_tokens.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db/migrate/20150525081931_remove_duplicate_tokens.rb b/db/migrate/20150525081931_remove_duplicate_tokens.rb index a43edd20fc8f..1d685f8422bd 100644 --- a/db/migrate/20150525081931_remove_duplicate_tokens.rb +++ b/db/migrate/20150525081931_remove_duplicate_tokens.rb @@ -1,15 +1,15 @@ class RemoveDuplicateTokens < ActiveRecord::Migration[4.2] def up - remove_foreign_key :tokens, :column => :host_id if foreign_key_exists?(:tokens, { :name => "tokens_host_id_fk" }) + remove_foreign_key :tokens, :column => :host_id if foreign_key_exists?(:tokens, :name => "tokens_host_id_fk") remove_index :tokens, :host_id if index_exists? :tokens, :host_id add_index :tokens, :host_id, :unique => true - add_foreign_key :tokens, :hosts, :name => "tokens_host_id_fk" unless foreign_key_exists?(:tokens, { :name => "tokens_host_id_fk" }) + add_foreign_key :tokens, :hosts, :name => "tokens_host_id_fk" unless foreign_key_exists?(:tokens, :name => "tokens_host_id_fk") end def down - remove_foreign_key :tokens, :column => :host_id if foreign_key_exists?(:tokens, { :name => "tokens_host_id_fk" }) + remove_foreign_key :tokens, :column => :host_id if foreign_key_exists?(:tokens, :name => "tokens_host_id_fk") remove_index :tokens, :host_id if index_exists? :tokens, :host_id add_index :tokens, :host_id - add_foreign_key :tokens, :hosts, :name => "tokens_host_id_fk" unless foreign_key_exists?(:tokens, { :name => "tokens_host_id_fk" }) + add_foreign_key :tokens, :hosts, :name => "tokens_host_id_fk" unless foreign_key_exists?(:tokens, :name => "tokens_host_id_fk") end end