tenant_contract_documents records a workspace's own filled contract document (for now the AVV): master version, PDF SHA-256, bucket key, digest of the filled-in values and the staff member's Keycloak sub. Rows are insert-only (an UPDATE trigger refuses changes); the newest per tenant and kind is current. Memory and Postgres stores, purge with the tenant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 lines
200 B
SQL
4 lines
200 B
SQL
DROP TRIGGER IF EXISTS tenant_contract_documents_immutable ON tenant_contract_documents;
|
|
DROP FUNCTION IF EXISTS tenant_contract_documents_immutable();
|
|
DROP TABLE IF EXISTS tenant_contract_documents;
|