tarde para este typo... #84
This commit is contained in:
parent
8f38f2fe5f
commit
305921ae63
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue