forked from molecule-ai/molecule-core
Merge pull request #646 from Molecule-AI/fix/migration-025-fk-type
Merge gate passed. +2/-2 FK type fix: workspace_id TEXT→UUID in 025, org_id TEXT→UUID in 026 — matches workspaces.id (UUID PK). Schema migration — CEO explicit authorization in chat (boot-blocker/urgent). UNSTABLE = known App token scope gap.
This commit is contained in:
commit
2ab7054a26
@ -4,7 +4,7 @@
|
||||
-- (default: Claude Sonnet input $3/1M, output $15/1M).
|
||||
CREATE TABLE IF NOT EXISTS workspace_token_usage (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
workspace_id TEXT NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE,
|
||||
workspace_id UUID NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE,
|
||||
period_start TIMESTAMPTZ NOT NULL,
|
||||
input_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
output_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-- enabled_by records the workspace ID of the admin who added the entry.
|
||||
CREATE TABLE IF NOT EXISTS org_plugin_allowlist (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
org_id TEXT NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE,
|
||||
org_id UUID NOT NULL REFERENCES workspaces(id) ON DELETE CASCADE,
|
||||
plugin_name TEXT NOT NULL,
|
||||
enabled_by TEXT NOT NULL,
|
||||
enabled_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user