Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,26 @@
|
||||
-- Phase 06 #22 — Per-user plugin enablement + config blob.
|
||||
--
|
||||
-- Adds the PluginUserConfig table referenced by docs/improvement-plan/
|
||||
-- 06-plugin-system/hooks-lifecycle.md. When a plugin needs per-user
|
||||
-- opt-in or per-user settings (Slack-channel-per-user etc.) the host
|
||||
-- writes a row here and the hook producer respects `enabled` before
|
||||
-- invoking the plugin for that user.
|
||||
|
||||
CREATE TABLE "PluginUserConfig" (
|
||||
"id" TEXT NOT NULL,
|
||||
"pluginId" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"enabled" BOOLEAN NOT NULL DEFAULT true,
|
||||
"configJson" JSONB,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
CONSTRAINT "PluginUserConfig_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX "PluginUserConfig_pluginId_userId_key" ON "PluginUserConfig" ("pluginId", "userId");
|
||||
CREATE INDEX "PluginUserConfig_userId_idx" ON "PluginUserConfig" ("userId");
|
||||
|
||||
ALTER TABLE "PluginUserConfig"
|
||||
ADD CONSTRAINT "PluginUserConfig_pluginId_fkey"
|
||||
FOREIGN KEY ("pluginId") REFERENCES "Plugin" ("id")
|
||||
ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
Reference in new issue
Block a user