feat(modules): settings_overrides and module_state migration
Add migration 016 with two tables for the module system: - settings_overrides: dotted-path config overrides set via admin UI - module_state: per-module enabled/disabled state Update testutil.TruncateAll to include new tables. Ref #94
This commit is contained in:
@@ -80,6 +80,7 @@ func TruncateAll(t *testing.T, pool *pgxpool.Pool) {
|
||||
|
||||
_, err := pool.Exec(context.Background(), `
|
||||
TRUNCATE
|
||||
settings_overrides, module_state,
|
||||
job_log, jobs, job_definitions, runners,
|
||||
dag_cross_edges, dag_edges, dag_nodes,
|
||||
audit_log, sync_log, api_tokens, sessions, item_files,
|
||||
|
||||
15
migrations/016_module_system.sql
Normal file
15
migrations/016_module_system.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- 016_module_system.sql — settings overrides and module state persistence
|
||||
|
||||
CREATE TABLE IF NOT EXISTS settings_overrides (
|
||||
key TEXT PRIMARY KEY,
|
||||
value JSONB NOT NULL,
|
||||
updated_by TEXT NOT NULL,
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS module_state (
|
||||
module_id TEXT PRIMARY KEY,
|
||||
enabled BOOLEAN NOT NULL,
|
||||
updated_by TEXT NOT NULL,
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
);
|
||||
Reference in New Issue
Block a user