I‘m writing some changes to the database schema right now, and using a single table for logging is making more and more sense to me than every other table having done_by,date_of, remarks, etc. fields like the current code and database does. (Not having a single log table makes more sense there because not much is logged.)
If we go that route, how would we represent the logged event? Integers? Fixed strings? I‘m thinking the latter e.g. “comment-deleted,” “IP-banned,” “submission-edited,” or at least integers linked to fixed strings in an auxiliary table.
Should we do this in a single database table?
I‘m writing some changes to the database schema right now, and using a single table for logging is making more and more sense to me than every other table having
done_by,
date_of
,remarks
, etc. fields like the current code and database does. (Not having a single log table makes more sense there because not much is logged.)If we go that route, how would we represent the logged event? Integers? Fixed strings? I‘m thinking the latter e.g. “comment-deleted,” “IP-banned,” “submission-edited,” or at least integers linked to fixed strings in an auxiliary table.