Skip to content

Commit 98f9e72

Browse files
committed
cleanup endorsements without valid endorsers
1 parent 7335849 commit 98f9e72

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class CleanupEndorsements < ActiveRecord::Migration
2+
def up
3+
Endorsement.delete_all(endorsing_user_id: [nil,''])
4+
end
5+
6+
def down
7+
raise ActiveRecord::IrreversibleMigration
8+
end
9+
end

db/schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# It's strongly recommended to check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(:version => 20150103105333) do
14+
ActiveRecord::Schema.define(:version => 20150106183244) do
1515

1616
add_extension "citext"
1717
add_extension "hstore"

0 commit comments

Comments
 (0)