Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HistoryModel

Field in HistoryModel:

  • UUID (char(36))**

  • isActive (bool)**

  • Json_ext (json)

  • DateCreated (date)**

  • DateUpdated (date)**

  • UserUpdatedUUID (fk users)**

  • UserCreatedUUID (fk users)**

...

  • save the action in the history log (django-simple-history)

  • UUID is generated (on database level ? Dragos Dobre ?)by database

  • update:

    • DateCreated (date)**

    • DateUpdated (date)**

    • UserUpdatedUUID (fk users)**

    • UserCreatedUUID (fk users)**

    • version = 1

...

  • HistoryModel fields

  • DateValidFrom (date)*

  • DateValidTo (date)

  • UUIDReplacement ReplacementUUID (varchar 36) (to be confirmed)

...

on Delete: same as HistoryModel

on Replace

  • update the fields for the to be replacecreate the new entity

    • save the action in the history log (django-simple-history)

    • check that the version save is still the same as the one in-memory

    • updateUUID is generated on database level

    • Update

      • DateCreated (date)**

      • DateUpdated (date)**

      • UserUpdatedUUID (fk users)**

      • UserCreatedUUID (fk users)**

      • version (+1)

      • ValidityTo set to ValidityFrom the new entity

    create the new entity,
      • = 1

    • check that

      • DateValidFrom is not empty

  • update the fields for the entity to be replaced

    • save the action in the history log (django-simple-history)

    • UUID is generated (on database level ? Dragos Dobre ?)

    • Update

      DateCreated (date)**

      check that the version save is still the same as the one in-memory

    • update

      • DateUpdated (date)**

      • UserUpdatedUUID (fk users)**UserCreatedUUID

      • version (fk users+1)**

      • version = 1

      check that

      • DateValidFrom is not empty

      • DateValidTo set to DateValidFrom the new entity

      • ReplacementUUID set to UUID of new entity (to be confirmed)