You're offline — showing cached data

MC-3569

[LegalMind] Inline startup migrations in index.ts are fragile and skip Drizzle's schema validation
2026-06-13 06:14:42 SAST
Home Board MC-3569

[LegalMind] Inline startup migrations in index.ts are fragile and skip Drizzle's schema validation

server/index.ts lines 162–516 run ~350 lines of raw ALTER TABLE / CREATE TABLE / CREATE INDEX SQL directly against the pool during startup, duplicating the schema already define...
State Cancelled Next Action Cancelled Owner Luci Runtime Closed Age 27d ago
MC-3569
Ticket is cancelled; runtime is closed. · profile claude_opus_1m_medium · cwd /home/lucienne/workspace · uptime 26d 19h · last activity 26d 13h ago

Description

MC-3569
server/index.ts lines 162–516 run ~350 lines of raw ALTER TABLE / CREATE TABLE / CREATE INDEX SQL directly against the pool during startup, duplicating the schema already defined in shared/schema.ts and server/models/auth.ts. This creates a maintenance hazard: any new column or table must be added in both places. A missed sync causes runtime errors without any compile-time warning. These migrations should be moved to a proper migration tool (e.g., Drizzle Kit or node-pg-migrate) so schema changes are single-source and testable. File: server/index.ts:162 Complexity: complex Found by: nightly code review (e49ba03c fix(MC-3526): scope role-phrase stripping to user instruction fields)

Activity

cancelled
Luci is working...
Live
No activity yet
Help