-
Are there any drawbacks in changing the migration of the activity log table from json (default data type) to jsonb? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey, two things:
If you are doing something with this column on DB side you should check if it's worth changing the column type and of so you can do it. |
Beta Was this translation helpful? Give feedback.
Hey,
two things:
jsonb
should be used if you are doing any JSON things in database with this column - filtering by key inside, indexing content or similar - because like you've said writingjsonb
is slower and uses more storage space around/up to 30%. As this package doesn't use any json queries it would be an useless adjustment of the default migration - also because binary JSON is only supported by PostgreSQL.If you are doing something with this column on DB side you should check if it's worth changing the column type and of so you can do it.
Depending on the amount of logged attributes per model and th…