feat(db): add guild_settings table for per-guild configuration

Store guild-specific settings (roles, channels, moderation options) in
database instead of config file, enabling per-guild configuration and
runtime updates without redeployment.
This commit is contained in:
syntaxbullet
2026-02-12 14:57:24 +01:00
parent 1ff24b0f7f
commit 5f107d03a7
5 changed files with 1369 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
CREATE TABLE "guild_settings" (
"guild_id" bigint PRIMARY KEY NOT NULL,
"student_role_id" bigint,
"visitor_role_id" bigint,
"color_role_ids" jsonb DEFAULT '[]'::jsonb,
"welcome_channel_id" bigint,
"welcome_message" text,
"feedback_channel_id" bigint,
"terminal_channel_id" bigint,
"terminal_message_id" bigint,
"moderation_log_channel_id" bigint,
"moderation_dm_on_warn" jsonb DEFAULT 'true'::jsonb,
"moderation_auto_timeout_threshold" jsonb,
"feature_overrides" jsonb DEFAULT '{}'::jsonb,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,13 @@
"when": 1770903573324,
"tag": "0003_new_senator_kelly",
"breakpoints": true
},
{
"idx": 4,
"version": "7",
"when": 1770904612078,
"tag": "0004_bored_kat_farrell",
"breakpoints": true
}
]
}