diff --git a/db/migrate/20150607143809_fix_photo_public_flag.rb b/db/migrate/20150607143809_fix_photo_public_flag.rb new file mode 100644 index 000000000..fa75167ef --- /dev/null +++ b/db/migrate/20150607143809_fix_photo_public_flag.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 76494c104..959c12c99 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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