modified version

This commit is contained in:
Stan
2026-04-21 23:26:13 +02:00
parent e7127f3215
commit bdd06105dd
46 changed files with 1250 additions and 5248 deletions
-13
View File
@@ -106,19 +106,6 @@ CREATE TABLE IF NOT EXISTS export_profiles (
UNIQUE KEY uq_export_profiles_code (code)
);
-- Small application settings that do not justify dedicated tables are stored as
-- JSON key/value pairs. This keeps the schema lean during the PoC phase while
-- still allowing centrally managed frontend behavior.
CREATE TABLE IF NOT EXISTS app_config (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
config_key VARCHAR(100) NOT NULL,
config_value_json JSON NOT NULL,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id),
UNIQUE KEY uq_app_config_key (config_key)
);
-- Submitted reports are stored server-side for centralized review and archival.
-- The browser creates reports locally first; this table receives them when the
-- operator explicitly submits. The report_uuid links back to the browser-local
-9
View File
@@ -223,12 +223,3 @@ ON DUPLICATE KEY UPDATE
include_template_version = VALUES(include_template_version),
include_export_timestamp = VALUES(include_export_timestamp),
is_active = VALUES(is_active);
-- App config values fine-tune the client without changing code.
INSERT INTO app_config (config_key, config_value_json)
VALUES
('autosave', '{"enabled": true, "intervalSeconds": 20}'),
('offlineCache', '{"templateTtlHours": 24, "refreshOnStartup": true}'),
('reportStatuses', '["draft", "in_progress", "ready_for_export", "exported", "archived"]')
ON DUPLICATE KEY UPDATE
config_value_json = VALUES(config_value_json);