Add migration to remove deleted aspects from auto follow back
This commit is contained in:
parent
07a344d051
commit
019dc1478c
2 changed files with 12 additions and 1 deletions
|
|
@ -0,0 +1,11 @@
|
|||
class RemoveDeletedAspectsFromAutoFollowBack < ActiveRecord::Migration
|
||||
def up
|
||||
User.where.not(auto_follow_back_aspect_id: Aspect.select(:id))
|
||||
.where(auto_follow_back: true)
|
||||
.update_all(auto_follow_back: false, auto_follow_back_aspect_id: nil)
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150220001357) do
|
||||
ActiveRecord::Schema.define(version: 20150403192408) do
|
||||
|
||||
create_table "account_deletions", force: :cascade do |t|
|
||||
t.string "diaspora_handle", limit: 255
|
||||
|
|
|
|||
Loading…
Reference in a new issue