You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a way to restrict versioning to a subset of columns.
These can be done in 2 ways: through whitelisting and blacklisting.
Why
To reduce the size of the log data.
How
Extend logidze_logger function (and related functions) to support 2 more arguments, except and only. Then CREATE TRIGGER migration looks like:
execute<<-SQL CREATE TRIGGER logidze_on_users BEFORE UPDATE OR INSERT ON users FOR EACH ROW WHEN (current_setting('logidze.disabled') <> 'on') EXECUTE PROCEDURE logidze_logger(null, null, '{name, role, email, phone}');SQL
Where the first argument is a limit (as it is now), the second argument is a blacklist of columns, and the third argument is a whitelist of columns.
We should be able to specify these parameters through generator script:
rails generate logidze:model Post --only="title,user_id,tags"
rails generate logidze:model Post --except="created_at,updated_at"
We also need a way to upgrade existing triggers (maybe through the --upgrade flag).
The text was updated successfully, but these errors were encountered:
Are --only and --except options mutually exclusive? If they are, wouldn't it be more convenient to have logidze_logger take a list of columns as the second argument and a boolean flag indicating the type of the filter (i.e., blacklist or whitelist)?
What
We need a way to restrict versioning to a subset of columns.
These can be done in 2 ways: through whitelisting and blacklisting.
Why
To reduce the size of the log data.
How
Extend
logidze_logger
function (and related functions) to support 2 more arguments,except
andonly
. ThenCREATE TRIGGER
migration looks like:Where the first argument is a
limit
(as it is now), the second argument is a blacklist of columns, and the third argument is a whitelist of columns.We should be able to specify these parameters through generator script:
We also need a way to upgrade existing triggers (maybe through the
--upgrade
flag).The text was updated successfully, but these errors were encountered: