diff --git a/db/migrate/20150822141540_fix_migrated_hosts.rb b/db/migrate/20150822141540_fix_migrated_hosts.rb new file mode 100644 index 000000000..d777eddb3 --- /dev/null +++ b/db/migrate/20150822141540_fix_migrated_hosts.rb @@ -0,0 +1,5 @@ +class FixMigratedHosts < ActiveRecord::Migration + def up + execute "UPDATE embeddable_hosts SET host = regexp_replace(host, '^https?:\/\/', '', 'i')" + end +end