- Created migration 146 to seed case type tags with various categories and keywords. - Created migration 147 to seed brand and type tags, including a comprehensive list of brands and case types. - Added migration 148 to introduce a new column `is_next` in `sag_todo_steps` for persistent next-task selection. - Implemented a new script `run_migrations.py` to facilitate running SQL migrations against the PostgreSQL database with options for dry runs and error handling.
15 lines
513 B
SQL
15 lines
513 B
SQL
-- Migration: 082_sag_comments
|
|
-- Created: 2026-02-01
|
|
|
|
CREATE TABLE IF NOT EXISTS sag_kommentarer (
|
|
id SERIAL PRIMARY KEY,
|
|
sag_id INTEGER NOT NULL REFERENCES sag_sager(id) ON DELETE CASCADE,
|
|
forfatter VARCHAR(255) NOT NULL,
|
|
indhold TEXT NOT NULL,
|
|
er_system_besked BOOLEAN DEFAULT FALSE,
|
|
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
|
deleted_at TIMESTAMP WITH TIME ZONE DEFAULT NULL
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_sag_kommentarer_sag_id ON sag_kommentarer(sag_id);
|