feat: api services table migration

This commit is contained in:
2025-05-25 15:38:40 +02:00
parent 491c9a824d
commit 11748bb68e

View File

@ -0,0 +1,27 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE api_services (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(), -- Unique identifier
-- OIDC-required fields
client_id TEXT UNIQUE NOT NULL,
client_secret TEXT NOT NULL, -- Store as hashed value
-- Metadata
name TEXT NOT NULL,
redirect_uris TEXT[] DEFAULT '{}',
scopes TEXT[] DEFAULT '{openid}',
grant_types TEXT[] DEFAULT '{authorization_code}',
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
is_active BOOLEAN NOT NULL DEFAULT true
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE api_services;
-- +goose StatementEnd