Some checks failed
Run Tests / test (push) Failing after 1m51s
- Introduced a new table `application_setting` to store configurable application options. - Implemented functions to manage CSS color settings, including loading, updating, and reading environment overrides. - Added a new settings view to render and manage theme colors. - Updated UI to include a settings page with theme color management and environment overrides display. - Enhanced CSS styles for the settings page and sidebar navigation. - Created unit and end-to-end tests for the new settings functionality and CSS management.
26 lines
835 B
PL/PgSQL
26 lines
835 B
PL/PgSQL
-- Migration: Create application_setting table for configurable application options
|
|
-- Date: 2025-10-25
|
|
-- Description: Introduces persistent storage for application-level settings such as theme colors.
|
|
|
|
BEGIN;
|
|
|
|
CREATE TABLE IF NOT EXISTS application_setting (
|
|
id SERIAL PRIMARY KEY,
|
|
key VARCHAR(128) NOT NULL UNIQUE,
|
|
value TEXT NOT NULL,
|
|
value_type VARCHAR(32) NOT NULL DEFAULT 'string',
|
|
category VARCHAR(32) NOT NULL DEFAULT 'general',
|
|
description TEXT,
|
|
is_editable BOOLEAN NOT NULL DEFAULT TRUE,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
CREATE UNIQUE INDEX IF NOT EXISTS ux_application_setting_key
|
|
ON application_setting (key);
|
|
|
|
CREATE INDEX IF NOT EXISTS ix_application_setting_category
|
|
ON application_setting (category);
|
|
|
|
COMMIT;
|