Sha256: 4fd012511d56848a4016f7f29c2fa6c48ee2775f891cd33b13e4c5c5412a3819
Contents?: true
Size: 289 Bytes
Versions: 58
Compression:
Stored size: 289 Bytes
Contents
class RemoveLeftoverTokens < ActiveRecord::Migration[4.2] def up existing_tokens = Host::Managed.all.map(&:token).compact if existing_tokens.empty? Token.delete_all else Token.where('id not in (?)', existing_tokens).delete_all end end def down end end
Version data entries
58 entries across 58 versions & 1 rubygems