bmc_hub/migrations/238_case_create_templates.sql
2026-09-08 01:55:47 +02:00

11 lines
457 B
SQL

CREATE TABLE IF NOT EXISTS case_create_templates (
id SERIAL PRIMARY KEY,
name VARCHAR(120) NOT NULL,
icon VARCHAR(80) NOT NULL DEFAULT 'bi-lightning',
is_active BOOLEAN NOT NULL DEFAULT TRUE,
sort_order INTEGER NOT NULL DEFAULT 0,
template_values JSONB NOT NULL DEFAULT '{}'::jsonb CHECK (jsonb_typeof(template_values) = 'object'),
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);