Add email column to suppliers for order and delivery operations

Fixes a production issue where the missing 'email' column in the 'suppliers' table caused 500 errors in the /api/orders and /api/deliveries endpoints, by adding the column and updating related frontend components and backend scripts.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/4SPuFx6
This commit is contained in:
michaelschal committed 2025-08-12 10:24:31 +00:00
1 parent c8a8b138e7
commit 831e1bb9b0
8 files changed
+754 -608

No files matched your search

+2 -4
View File
@@ -68,18 +68,16 @@ export const userGroups = pgTable("user_groups", {
createdAt: timestamp("created_at").defaultNow(),
});
// Suppliers
// Suppliers - Schema exact correspondant à la production
export const suppliers = pgTable("suppliers", {
id: serial("id").primaryKey(),
name: varchar("name").notNull(),
contact: varchar("contact"),
phone: varchar("phone"),
email: varchar("email"),
address: text("address"),
hasDlc: boolean("has_dlc").default(false), // Coche DLC pour la gestion DLC
automaticReconciliation: boolean("automatic_reconciliation").default(false), // Rapprochement automatique BL/Factures
createdAt: timestamp("created_at").defaultNow(),
updatedAt: timestamp("updated_at").defaultNow(),
automaticReconciliation: boolean("automatic_reconciliation").default(false), // Rapprochement automatique BL/Factures
});
// Orders