Commit cc5bd16e authored by Jonne Haß's avatar Jonne Haß

Merge pull request #5848 from svbergerem/migrate-only-sharing

Fix only sharing flag for contacts that are receiving
parents b90dc790 c7c20f9b
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
## Bug fixes ## Bug fixes
* Disable auto follow back on aspect deletion [#5846](https://github.com/diaspora/diaspora/pull/5846) * Disable auto follow back on aspect deletion [#5846](https://github.com/diaspora/diaspora/pull/5846)
* Fix only sharing flag for contacts that are receiving [#5848](https://github.com/diaspora/diaspora/pull/5848)
## Features ## Features
......
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 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150403192408) do ActiveRecord::Schema.define(version: 20150403212139) do
create_table "account_deletions", force: :cascade do |t| create_table "account_deletions", force: :cascade do |t|
t.string "diaspora_handle", limit: 255 t.string "diaspora_handle", limit: 255
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment