bmc_hub/migrations/1058_case_command_batches.sql
Christian 4871dd2d9e Add comprehensive test coverage for various modules
- Introduced tests for mail templates including ranking, rendering, and attachment handling.
- Added tests for time billing selection and approval processes, ensuring proper validation and state management.
- Implemented tests for case types in JavaScript, focusing on loading and editing functionality.
- Created tests for contact mail AI integration, ensuring proper parsing and error handling.
- Developed tests for dark theme CSS contrast and loading order.
- Added tests for invoice fee service, covering various scenarios including exemptions and invalid inputs.
- Implemented vendor resource tests, ensuring proper file handling and query validation.
2026-10-08 08:58:02 +02:00

19 lines
775 B
SQL

-- Additive ledger. Batch effects and result are committed in the same transaction.
CREATE TABLE IF NOT EXISTS sag_command_batches (
request_id UUID PRIMARY KEY,
sag_id INTEGER NOT NULL REFERENCES sag_sager(id),
actor_id INTEGER NOT NULL REFERENCES users(user_id),
payload_hash TEXT NOT NULL,
result JSONB NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
ALTER TABLE sag_todo_steps ADD COLUMN IF NOT EXISTS assigned_to_user_id INTEGER REFERENCES users(user_id);
CREATE TABLE IF NOT EXISTS sag_command_mail_drafts (
id SERIAL PRIMARY KEY,
sag_id INTEGER NOT NULL REFERENCES sag_sager(id),
actor_id INTEGER NOT NULL REFERENCES users(user_id),
subject TEXT NOT NULL,
body TEXT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);