Versions Compared

Key

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

...

  • create the new entity

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

    • UUID is generated on database level

    • Update

      • DateCreated (date)**

      • DateUpdated (date)**

      • UserUpdatedUUID (fk users)**

      • UserCreatedUUID (fk users)**

      • version = 1

    • check that

      • DateValidFrom is not empty

  • update the fields for the entity to be replaced (ri)

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

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

    • update

      • DateUpdated (date)**

      • UserUpdatedUUID (fk users)**

      • version (+1)

      • DateValidTo set to DateValidFrom the new entity(ni) if ni.DateValidFrom < ri.DateValidTo or ri.DateValidTo is null

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