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

Investigate change history solutions #536

Open
artur-intech opened this issue Jun 1, 2017 · 9 comments
Open

Investigate change history solutions #536

artur-intech opened this issue Jun 1, 2017 · 9 comments
Assignees

Comments

@artur-intech
Copy link
Contributor

artur-intech commented Jun 1, 2017

Requirements

  • Soft delete for everything (every record should leave a trail in the system)
    • Objects to exclude from this rule?
    • Should not affect performance (significantly)
  • No recovery needed
  • Searching and filtering (by what columns?)
    • by EPP operations

Current problems

  • Users cannot trust history view in admin (no tests, poor UI)
  • Some bugs logging a user who made a change
  • Impossible to make any filtering and sorting due to JSON-based object change history

Solutions

Continue using PaperTrail

Disadvantages

  • Version management and recovery are not needed

  • Needs some refactoring anyway

  • Needs update; latest version has incompatible changes, so our code needs to be modified

    • Find out if we can index JSON fields on DB level to perform filtering and searching

Get rid of PaperTrail and create archive database

Disadvantages

  • Old data conversion

Notes:


related tickets:
#944

@artur-intech artur-intech changed the title papertrail Investigate paper_trail alternatives Jun 1, 2017
@artur-intech artur-intech self-assigned this Jun 1, 2017
@artur-intech
Copy link
Contributor Author

artur-intech commented Jun 1, 2017

Needed for #269
See also #426

@artur-intech artur-intech changed the title Investigate paper_trail alternatives Investigate change history solutions Jun 1, 2017
@artur-intech artur-intech changed the title Investigate change history solutions Investigate soft delete solutions Jun 1, 2017
@artur-intech artur-intech changed the title Investigate soft delete solutions Investigate change history solutions Jun 1, 2017
@artur-intech
Copy link
Contributor Author

@vohmar Please provide requirements for 3rd list item in "Requirements" section

@vohmar
Copy link
Contributor

vohmar commented Jun 19, 2017

domain:

  • date + period
  • domain name
  • contact
    • contact name
    • contact code (personal, business id, birthday)
    • contact country
    • contact type
  • status
  • host name
  • host ip
  • registrar
  • epp requests (create, update, renew, transfer, delete)

contact:

  • date + period
  • contact name
  • contact code (personal, business id, birthday)
  • contact country
  • contact type
  • status
  • registrar
  • epp requests (create, update, renew, transfer, delete) + related epp requests (domain update, domain create)
  • domain (domains that contact is associated to)

registrar:

  • date + period
  • registrar name
  • business id
  • domain

@artur-intech
Copy link
Contributor Author

@ratM1n This needs your input regarding JSON support in Postgres

@teadur
Copy link
Contributor

teadur commented Sep 25, 2017

@artur-beljajev Postgres does support indexing on JSON fields.

There are two JSON data types: json and jsonb. They accept almost identical sets of values as input. The major practical difference is one of efficiency. The json data type stores an exact copy of the input text, which processing functions must reparse on each execution; while jsonb data is stored in a decomposed binary format that makes it slightly slower to input due to added conversion overhead, but significantly faster to process, since no reparsing is needed. jsonb also supports indexing, which can be a significant advantage.

https://www.postgresql.org/docs/9.4/static/datatype-json.html

@artur-intech
Copy link
Contributor Author

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

4 participants