tarde para este typo... #84

This commit is contained in:
f 2020-08-01 20:22:32 -03:00
parent 8f38f2fe5f
commit 305921ae63

View file

@ -3,6 +3,6 @@ class ChangeRefererToOrigin < ActiveRecord::Migration[6.0]
rename_column :access_logs, :http_referer, :http_origin
# Eliminar todos los referers anteriores manteniendo el origin
ActiveRecord::Base.connection.execute("update access_logs set http_origin = split_part(http_origin, '/', 1) || '//' || split_part(http_origin, '/', 2) where http_origin is not null")
ActiveRecord::Base.connection.execute("update access_logs set http_origin = split_part(http_origin, '/', 1) || '//' || split_part(http_origin, '/', 3) where http_origin is not null")
end
end