+21
-2
internal/db/migrations/005_create_communities_tables.sql
+21
-2
internal/db/migrations/005_create_communities_tables.sql
···visibility TEXT NOT NULL DEFAULT 'public' CHECK (visibility IN ('public', 'unlisted', 'private')),···CREATE INDEX idx_communities_name_trgm ON communities USING gin(name gin_trgm_ops); -- For fuzzy searchCREATE INDEX idx_communities_description_trgm ON communities USING gin(description gin_trgm_ops);···
···visibility TEXT NOT NULL DEFAULT 'public' CHECK (visibility IN ('public', 'unlisted', 'private')),···CREATE INDEX idx_communities_name_trgm ON communities USING gin(name gin_trgm_ops); -- For fuzzy searchCREATE INDEX idx_communities_description_trgm ON communities USING gin(description gin_trgm_ops);+CREATE INDEX idx_communities_pds_email ON communities(pds_email); -- V2: For credential lookups+COMMENT ON COLUMN communities.pds_password_hash IS 'V2: bcrypt hash - NEVER return in API responses';+COMMENT ON COLUMN communities.pds_refresh_token IS 'V2: Refresh token - NEVER log or expose in APIs';···