bmc_hub/migrations/1010_internet_invoice_review_decisions.sql
Christian d81a8f41b4 feat: Add end-to-end tests for Sag module HTTP API
- Implemented a comprehensive end-to-end testing script for the Sag module's HTTP API, covering various functionalities including case creation, updates, and file uploads.
- Introduced a safe HTML sanitizer utility to ensure safe rendering of HTML content in the BMC Hub UI.
- Added database migrations for new features including WAN connection marking for wall outlets, permanent audit trails for supplier invoices, and dedicated permissions for the Sag module.
- Created a migration center for manual subscription and invoice migrations with relevant tables and indexes.
- Added tests for migration center functionalities, ensuring stability and correctness of the new features.
2026-07-28 14:18:24 +02:00

16 lines
730 B
SQL

CREATE TABLE IF NOT EXISTS internet_connections_invoice_review_decisions (
id BIGSERIAL PRIMARY KEY,
run_id BIGINT NOT NULL REFERENCES internet_connections_invoice_sync_runs(id) ON DELETE CASCADE,
line_number INTEGER NOT NULL,
action VARCHAR(30) NOT NULL
CHECK (action IN ('ignore', 'link_existing', 'create_separate')),
connection_id INTEGER REFERENCES internet_connections_connections(id) ON DELETE SET NULL,
note TEXT,
resolved_by_user_id INTEGER,
resolved_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE (run_id, line_number)
);
CREATE INDEX IF NOT EXISTS idx_internet_invoice_review_decisions_run
ON internet_connections_invoice_review_decisions(run_id, line_number);