Files
fm_be/migrations/goose/20260610_contact_username_non_unique.sql
2026-07-16 22:16:45 +07:00

15 lines
396 B
SQL

-- +goose Up
-- Username uniqueness is now enforced in the backend for contact flows,
-- so keep a regular index for lookups instead of a unique constraint.
DROP INDEX IF EXISTS idx_users_username ON users;
CREATE INDEX idx_users_username
ON users (username);
-- +goose Down
DROP INDEX IF EXISTS idx_users_username ON users;
CREATE UNIQUE INDEX idx_users_username
ON users (username);
iya