cirandas.net

ref: master

db/migrate/20150507204849_remove_broken_profile_suggestions.rb


1
2
3
4
5
6
7
8
9
class RemoveBrokenProfileSuggestions < ActiveRecord::Migration
  def up
    execute("DELETE FROM profile_suggestions WHERE suggestion_id NOT IN (SELECT id from profiles)")
  end

  def down
    say "this migration can't be reverted"
  end
end