diff --git a/db/migrate/20150507204849_remove_broken_profile_suggestions.rb b/db/migrate/20150507204849_remove_broken_profile_suggestions.rb new file mode 100644 index 0000000..6a69d78 --- /dev/null +++ b/db/migrate/20150507204849_remove_broken_profile_suggestions.rb @@ -0,0 +1,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 -- libgit2 0.21.2