5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 04:11:41 +00:00

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