Isambard
(Isambard)
17 Giugno 2024, 1:45pm
1
Continuato da: Don't log all post edits in staff action logs for a user-merge - #4 by JammyDodger
Grazie. Nel frattempo, se un guru della console rails può suggerire un comando per eliminare i log delle modifiche dei post di sistema per una data specifica, sarà utile per ripulire i log.
Penso che otterrai più risposte se questo è un argomento separato, quindi l’ho diviso.
Sono memorizzati nella tabella user_histories, se questo ti aiuta a iniziare?
2 Mi Piace
Isambard
(Isambard)
17 Giugno 2024, 5:11pm
3
Pensavo sarebbe stato qualcosa del tipo:
UserHistory.where("created_at > ?", date).where(and staffuser=xyz, and action=edit post).destroy_all
ma con la sintassi corretta
Isambard
(Isambard)
17 Giugno 2024, 5:17pm
4
Se è solo nella tabella, è probabilmente più facile eliminarli direttamente da postgres.
A memoria, è:
UserHistory.where(bla,bla,bla)
I don’t believe there is a way currently to do this from the UI. I think you would be able to delete the staff action itself through the rails console if you have access.
You can find the id for the staff action either by checking the staff logs json (/admin/logs/staff_action_logs.json) or using a data explorer query to give you a list to pick it from:
SELECT *
FROM user_histories
WHERE action = 17 --action code for 'delete post'
ORDER BY created_at DESC
And then using that id in the rails co…
Anche se ci sono altre parti in Administrative Bulk Operations che potrebbero aiutarti a completare il bla bla bla
(Al momento non sono al computer)
1 Mi Piace