diff --git a/db/migrate/20140427041839_remove_non_votes.rb b/db/migrate/20140427041839_remove_non_votes.rb new file mode 100644 index 00000000..15587e79 --- /dev/null +++ b/db/migrate/20140427041839_remove_non_votes.rb @@ -0,0 +1,12 @@ +class RemoveNonVotes < ActiveRecord::Migration + class PostVote < ActiveRecord::Base + end + + def up + PostVote.where('score < 1').delete_all + end + + def down + ActiveRecord::IrreversibleMigration + end +end