Files
multica/server/migrations/119_user_created_at_index.up.sql
LinYushen 99afb82c50 Add index on "user".created_at (#4063)
Adds migration 119 creating idx_user_created_at on "user"(created_at)
using CREATE INDEX CONCURRENTLY, matching the repo convention for
index-only migrations (114/115).

Co-authored-by: multica-agent <github@multica.ai>
2026-06-12 15:53:55 +08:00

9 lines
450 B
SQL

-- Index on "user".created_at to support ordering/filtering users by signup time.
--
-- "user" is a reserved word so it stays double-quoted. The migration runner
-- executes files outside an explicit transaction, so CONCURRENTLY is kept in
-- its own single-statement migration to avoid Postgres' implicit transaction
-- block for multi-statement query strings.
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_user_created_at
ON "user" (created_at);