add migration to fix public flag of photos
This commit is contained in:
parent
e16b9af7e6
commit
99b36598c7
2 changed files with 10 additions and 1 deletions
9
db/migrate/20150607143809_fix_photo_public_flag.rb
Normal file
9
db/migrate/20150607143809_fix_photo_public_flag.rb
Normal 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
|
||||||
|
|
@ -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: 20150531005120) do
|
ActiveRecord::Schema.define(version: 20150607143809) 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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue