Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
Commit8ffc225unknown_key

chore: rename enterprise SSO migration 0077 → 0092 (collision avoidance)

chore: rename enterprise SSO migration 0077 → 0092 (collision avoidance)

https://claude.ai/code/session_01DzJMTFASjMHt2f5ze4cNLR
Claude committed on June 7, 2026Parent: ef38eca
2 files changed+0458ffc2255d6fb257d02665aa12462a5cff034d48a
2 changed files+0−47
Deleteddrizzle/0092_enterprise_sso.sql+0−47View fileUnifiedSplit
1
2CREATE TABLE IF NOT EXISTS org_sso_configs (
3 id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
4 org_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
5 provider text NOT NULL DEFAULT 'saml', -- 'saml' | 'oidc'
6 -- SAML fields
7 idp_entity_id text,
8 idp_sso_url text,
9 idp_certificate text, -- PEM cert from IdP
10 sp_entity_id text, -- our entity ID (computed)
11 -- OIDC fields
12 oidc_client_id text,
13 oidc_client_secret text,
14 oidc_discovery_url text,
15 -- Common
16 domain_hint text, -- e.g. "acme.com" — auto-routes users from this domain to SSO
17 attribute_mapping jsonb DEFAULT '{"email":"email","name":"name","username":"preferred_username"}',
18 enabled boolean NOT NULL DEFAULT false,
19 created_at timestamp DEFAULT now(),
20 updated_at timestamp DEFAULT now(),
21 UNIQUE(org_id)
22);
23
24CREATE INDEX IF NOT EXISTS org_sso_configs_domain ON org_sso_configs(domain_hint) WHERE domain_hint IS NOT NULL;
25
26CREATE TABLE IF NOT EXISTS scim_tokens (
27 id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
28 org_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
29 token_hash text NOT NULL UNIQUE, -- SHA-256 of the token
30 created_by uuid NOT NULL REFERENCES users(id),
31 created_at timestamp DEFAULT now(),
32 last_used_at timestamp
33);
34
35CREATE TABLE IF NOT EXISTS org_sso_sessions (
36 id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
37 user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
38 org_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
39 idp_session_id text,
40 created_at timestamp DEFAULT now(),
41 expires_at timestamp NOT NULL
42);
43
44CREATE INDEX IF NOT EXISTS org_sso_sessions_user ON org_sso_sessions(user_id);
45CREATE INDEX IF NOT EXISTS org_sso_sessions_expires ON org_sso_sessions(expires_at);
Renameddrizzle/0077_enterprise_sso.sqldrizzle/0094_enterprise_sso.sql+0−0View fileUnifiedSplit
No textual changes.