Files
uptimesebi/internal/migrations/sql/00006_user_locale.sql

7 lines
238 B
SQL

-- +goose Up
-- Validated against the supported catalogs in code; the check only guards the format.
ALTER TABLE users ADD COLUMN locale text CHECK (locale ~ '^[a-z]{2}(-[A-Z]{2})?$');
-- +goose Down
ALTER TABLE users DROP COLUMN locale;