add migration to fix public flag of photos

This commit is contained in:
Benjamin Neff 2015-06-07 17:04:24 +02:00 committed by Dennis Schubert
parent e16b9af7e6
commit 99b36598c7
2 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,9 @@
class FixPhotoPublicFlag < ActiveRecord::Migration
def up
Photo.joins(:status_message).where(posts: {public: true}).update_all(public: true)
end
def down
raise ActiveRecord::IrreversibleMigration
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150531005120) do
ActiveRecord::Schema.define(version: 20150607143809) do
create_table "account_deletions", force: :cascade do |t|
t.string "diaspora_handle", limit: 255