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.
14 lines
532 B
SQL
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);
|