Files
LogiFlow/attached_assets/Pasted-tions-Error-fetching-SAV-stats-error-column-priority-does-not-exist-at--1755163192829_1755163192830.txt
T
michaelschal 45abdc5973 Fix production SAV module issues by adding missing columns and updating schemas
Introduce a SQL migration script to address critical production issues in the SAV module by adding missing columns to the `sav_tickets` table, correcting default values, and ensuring proper foreign key constraints and indexes are in place. This resolves "column does not exist" errors and aligns the production database schema with the development environment.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 31f9bd88-0285-4787-81b3-31ceeea5a08b
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/31f9bd88-0285-4787-81b3-31ceeea5a08b/BuVhk7G
2025-08-14 09:21:36 +00:00

204 lines
3.5 KiB
Plaintext

tions
Error fetching SAV stats: error: column "priority" does not exist
at /app/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22
at async DatabaseStorage.getSavTicketStats (file:///app/dist/index.js:2046:25)
at async file:///app/dist/index.js:6203:21 {
length: 108,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: undefined,
position: '28',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3665',
routine: 'errorMissingColumn'
}
GET /api/sav/stats 500 in 11ms
Error fetching SAV tickets: error: column sav_tickets.priority does not exist
at /app/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22
at async DatabaseStorage.getSavTickets (file:///app/dist/index.js:1974:25)
at async file:///app/dist/index.js:6016:23 {
length: 119,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: undefined,
position: '350',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3665',
routine: 'errorMissingColumn'
}
GET /api/sav/tickets 500 in 14ms
Error fetching SAV stats: error: column "priority" does not exist
at /app/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22
at async DatabaseStorage.getSavTicketStats (file:///app/dist/index.js:2046:25)
at async file:///app/dist/index.js:6203:21 {
length: 108,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: undefined,
position: '28',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3665',
routine: 'errorMissingColumn'
}
GET /api/sav/stats 500 in 13ms
Error fetching SAV tickets: error: column sav_tickets.priority does not exist
at /app/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22
at async DatabaseStorage.getSavTickets (file:///app/dist/index.js:1974:25)
at async file:///app/dist/index.js:6016:23 {
length: 119,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: undefined,
position: '350',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3665',
routine: 'errorMissingColumn'
}
GET /api/sav/tickets 500 in 14ms