Files
ajet-chat/api/resources/migrations/002-create-oauth-accounts.up.sql
2026-02-17 17:30:45 -05:00

10 lines
407 B
SQL

CREATE TABLE IF NOT EXISTS oauth_accounts (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
user_id uuid NOT NULL REFERENCES users (id) ON DELETE CASCADE,
provider text NOT NULL,
provider_user_id text NOT NULL,
provider_username text,
created_at timestamptz DEFAULT now(),
UNIQUE (provider, provider_user_id)
);