## Now Tenant related - Signature (new created) - PaymentCard 1:1 - Notifications 1:N - Top up 1:N Deposit contract related - Tenant (new version) - Closing (new version) - Logs 1:N - File uploads 1:N ## Problem We want to have more features / relations to contract, we dont want to transfer them during new version ## Idea - Instead of replacing version, we create current version as outdated version in db - Edit the previous verision after that - We don't need to reconnected unversioned things to the new entity ### Relations Tenant related - Signature (new created, transfer the old to the outdated contract) - PaymentCard 1:1 (leave) - Notifications 1:N (leave) - Top up 1:N (leave) Deposit contract related - Tenant (copy to the old contract) - Closing (leave) - Logs 1:N (leave) - File uploads 1:N (leave) ### What we need - Change the logic - simple flow changes - create outdated contract first, create new signatures, remove setting of ids on related unversion content - Withdraw - We need to completely rework - Perform update on tenant and contract with previous version values and delete the old version ## Improved idea - New table for outdated versions