Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename creator_str and updator_str DB columns #944

Open
artur-intech opened this issue Aug 23, 2018 · 2 comments
Open

Rename creator_str and updator_str DB columns #944

artur-intech opened this issue Aug 23, 2018 · 2 comments

Comments

@artur-intech
Copy link
Contributor

artur-intech commented Aug 23, 2018

They might be called author and editor or creator and updater instead. There is no such thing as "updator".

@vohmar
Copy link
Contributor

vohmar commented Aug 23, 2018

very low priority, we can come back to this once we will start with replacing papertrail.

@maciej-szlosarczyk
Copy link
Contributor

The cost of this change outweighs the benefits. We'd need to change every database table we have either through multi-stage migration or a downtime. After that, we'd also need to change values inside the JSON blobs in paper_trail history or otherwise we'd need to write history queries like this:

SELECT "log_domains".* FROM "log_domains" WHERE (object->> 'updator_str' = 'somestring' OR object ->> 'updater_str' = 'somestring')

Even when we replace paper_trail with Postgres triggers or any other solution, the history will still be stored as JSON, so the retroactive change would still be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants