mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-12 01:37:40 +02:00
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
This commit is contained in:
1 parent
d9c4e091af
commit
45abdc5973
4 files changed
+319
-2
No files matched your search
+2
-2
@@ -618,7 +618,7 @@ export const savTickets = pgTable("sav_tickets", {
|
||||
problemDescription: text("problem_description").notNull(),
|
||||
resolutionDescription: text("resolution_description"),
|
||||
status: varchar("status", { length: 50 }).notNull().default("nouveau"),
|
||||
priority: varchar("priority", { length: 50 }).notNull().default("normal"), // normal, urgent, critique
|
||||
priority: varchar("priority", { length: 50 }).notNull().default("normale"), // normale, haute, critique
|
||||
clientName: varchar("client_name", { length: 255 }),
|
||||
clientPhone: varchar("client_phone", { length: 255 }),
|
||||
createdBy: varchar("created_by", { length: 255 }).notNull(),
|
||||
@@ -673,7 +673,7 @@ export const insertSavTicketSchema = createInsertSchema(savTickets).omit({
|
||||
resolvedAt: true,
|
||||
closedAt: true,
|
||||
}).extend({
|
||||
priority: z.enum(["normal", "urgent", "critique"]).default("normal"),
|
||||
priority: z.enum(["faible", "normale", "haute", "critique"]).default("normale"),
|
||||
status: z.enum(["nouveau", "en_cours", "attente_pieces", "attente_echange", "resolu", "ferme"]).default("nouveau"),
|
||||
problemType: z.enum(["defectueux", "pieces_manquantes", "non_conforme", "autre"]).default("defectueux"),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user