Fix only sharing flag for contacts that are receiving
This commit is contained in:
parent
bec2508545
commit
c7c20f9b4e
2 changed files with 12 additions and 1 deletions
11
db/migrate/20150403212139_fix_wrong_only_sharing.rb
Normal file
11
db/migrate/20150403212139_fix_wrong_only_sharing.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class FixWrongOnlySharing < ActiveRecord::Migration
|
||||
def up
|
||||
Contact.where(sharing: true, receiving: false)
|
||||
.where(id: AspectMembership.select(:contact_id))
|
||||
.update_all(receiving: true)
|
||||
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: 20150403212139) do
|
||||
|
||||
create_table "account_deletions", force: :cascade do |t|
|
||||
t.string "diaspora_handle", limit: 255
|
||||
|
|
|
|||
Loading…
Reference in a new issue