add db migration to cleanup default avatar image-urls

closes #6014
This commit is contained in:
Benjamin Neff 2015-05-31 03:03:35 +02:00 committed by Dennis Schubert
parent 03dbb75dd5
commit b8a6af2742
3 changed files with 12 additions and 1 deletions

View file

@ -51,6 +51,7 @@
* Fix tag rendering in emails [#6009](https://github.com/diaspora/diaspora/pull/6009)
* Fix the logo in emails [#6013](https://github.com/diaspora/diaspora/pull/6013)
* Disable autocorrect for username on mobile sign in [#6028](https://github.com/diaspora/diaspora/pull/6028)
* Fix broken default avatars in the database [#6014](https://github.com/diaspora/diaspora/pull/6014)
## Features
* Hide post title of limited post in comment notification email [#5843](https://github.com/diaspora/diaspora/pull/5843)

View file

@ -0,0 +1,10 @@
class CleanupDefaultAvatars < ActiveRecord::Migration
def up
Profile.where("image_url LIKE ?", "%user/default%")
.update_all(image_url: nil, image_url_small: nil, image_url_medium: nil)
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: 20150403212139) do
ActiveRecord::Schema.define(version: 20150531005120) do
create_table "account_deletions", force: :cascade do |t|
t.string "diaspora_handle", limit: 255