migration to fix video_embed_url in existing projects (the new url will always contain the // before the host

Esse commit está contido em:
Diogo Biazus
2014-06-05 14:36:49 -04:00
commit b6609fe231
@@ -0,0 +1,7 @@
class FixVideEmbedUrls < ActiveRecord::Migration
def change
execute "
UPDATE projects SET video_embed_url = regexp_replace(video_embed_url, '^(\\w)', '//\\1');
"
end
end