Files
archify-vscode-ext-sync/crates/store/migrations/0002_identities.sql
T
Oleg Lukasonok 99778d7489 Archify Sync server, Dockerfile and Helm chart
Rust server (axum, yrs, sqlx/PostgreSQL): live shared models over the y-websocket protocol, versions, browser sign-in with PKCE, invites, single sign-on through OIDC, metrics. Docker image on distroless, compose file, and a Helm chart with one pod, optional bundled PostgreSQL and secrets from existing Secrets.
2026-11-06 12:06:59 +02:00

14 lines
532 B
SQL

-- Accounts signed in through an identity provider (OIDC): the provider's
-- issuer and subject name the person; the account is ours.
CREATE TABLE identities (
issuer text NOT NULL,
subject text NOT NULL,
account_id uuid NOT NULL REFERENCES accounts (id) ON DELETE CASCADE,
email text,
created_at timestamptz NOT NULL DEFAULT now(),
last_seen_at timestamptz NOT NULL DEFAULT now(),
PRIMARY KEY (issuer, subject)
);
CREATE INDEX identities_account ON identities (account_id);