Add migration to drop invalid OpenGraphCaches, closes #5465

URI.extract recognized http:// as an URL, causing invalid
associations. #5347 already fixed the parsing, this just
cleans up the caches to get rid of the false associations.
This commit is contained in:
Jonne Haß 2014-12-09 05:27:19 +01:00
parent cc0c19b482
commit ed0005c44d
2 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,9 @@
class DropOpenGraphCachesWithInvalidUrls < ActiveRecord::Migration
def up
OpenGraphCache.where(url: 'http://').delete_all
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: 20141024170120) do
ActiveRecord::Schema.define(version: 20141209041241) do
create_table "account_deletions", force: true do |t|
t.string "diaspora_handle"