RealEnder / redmine_auditlog

Provides full auditlog for user actions in Redmine instance
GNU General Public License v3.0
3 stars 5 forks source link

Column audited_changes too small and a small instructions suggestion #2

Open rocketmedia opened 4 years ago

rocketmedia commented 4 years ago

In our redmine 4.1.1 instance we've noticed if the issue is too long, redmine will throw a 500 error because the audited_changes column is too small. I fixed it with the SQL Command ALTER TABLE audits MODIFY COLUMN audited_changes LONGTEXT; it changes the type of the column from TEXT (65,535 bytes = 64 KiB) to LONGTEXT (4,294,967,295 bytes = 4 GiB) so there will be nearly no limit to issue lenght.

Also you really should change the command rails generate audited:install --audited-changes-column-type jsonb in the "How to use" description because it broke our MySQL database because there was no jsonb support, you could highlight it like: For MySQL Databases: rails generate audited:install

For PostgreSQL Databases: rails generate audited:install --audited-changes-column-type jsonb

grafik

RealEnder commented 4 years ago

Thanks for your suggestion on the installation part, will add the note. As for the audited_changes column, the audtis table is created by audited gem. Not sure we can influence the type here, but I can try to submit an issue/PR against https://github.com/collectiveidea/audited. It's not frequently maintained, there are tons of issues and PRs there, so I don't expect this to be fixed soon there. But your change is pretty straightforward, so it will work that way. I still plan to play with https://github.com/paper-trail-gem/paper_trail , which is better maintained.