Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
12 lines
380 B
SQL
12 lines
380 B
SQL
-- +goose Up
|
|
CREATE TABLE orgs (
|
|
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
slug citext NOT NULL UNIQUE CHECK (slug ~ '^[a-z0-9][a-z0-9-]{1,62}$'),
|
|
name text NOT NULL CHECK (length(name) BETWEEN 1 AND 200),
|
|
created_at timestamptz NOT NULL DEFAULT now(),
|
|
updated_at timestamptz NOT NULL DEFAULT now()
|
|
);
|
|
|
|
-- +goose Down
|
|
DROP TABLE orgs;
|