- Introduced configuration history management in Filters and Recursive Routes pages, allowing users to view and restore previous configurations. - Updated state management to handle live data loading and error states more effectively, improving user experience during data fetching. - Added new components for displaying configuration history and integrated them into existing pages. - Enhanced API interactions to support fetching and applying configuration revisions, ensuring data consistency across the application. - Updated tests to cover new functionalities and ensure reliability. Co-authored-by: Cursor <[email protected]>
17 lines
688 B
SQL
17 lines
688 B
SQL
-- История desired/actual снапшотов managed-секций (фильтры, рекурсивные маршруты).
|
|
-- Retention — prune в сервисе (последние 50 на пару server+section).
|
|
|
|
CREATE TABLE IF NOT EXISTS config_revisions (
|
|
id TEXT PRIMARY KEY,
|
|
server_id BIGINT NOT NULL REFERENCES servers(id) ON DELETE CASCADE,
|
|
section TEXT NOT NULL,
|
|
source TEXT NOT NULL,
|
|
fingerprint TEXT NOT NULL,
|
|
payload JSONB NOT NULL DEFAULT '[]'::jsonb,
|
|
note TEXT,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_config_revisions_server_section_created
|
|
ON config_revisions (server_id, section, created_at DESC);
|