Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix: table order after id refactor
Brad Barbind8dac7306d20
diff --git a/apps/erp/app/modules/production/production.service.ts b/apps/erp/app/modules/production/production.service.tsindex 3d70071e41..e52479a513 100644--- a/apps/erp/app/modules/production/production.service.ts+++ b/apps/erp/app/modules/production/production.service.ts@@ -244,7 +244,7 @@ export async function getJobs(if (args) {query = setGenericQueryFilters(query, args, [- { column: "id", ascending: false },+ { column: "jobId", ascending: false },]);}diff --git a/apps/erp/app/modules/purchasing/purchasing.service.ts b/apps/erp/app/modules/purchasing/purchasing.service.tsindex 377fd96437..fad6a6ba06 100644--- a/apps/erp/app/modules/purchasing/purchasing.service.ts+++ b/apps/erp/app/modules/purchasing/purchasing.service.ts@@ -208,7 +208,7 @@ export async function getPurchaseOrders(}query = setGenericQueryFilters(query, args, [- { column: "id", ascending: false },+ { column: "purchaseOrderId", ascending: false },]);return query;@@ -574,7 +574,7 @@ export async function getSupplierQuotes(}query = setGenericQueryFilters(query, args, [- { column: "id", ascending: false },+ { column: "supplierQuoteId", ascending: false },]);return query;}diff --git a/apps/erp/app/modules/sales/sales.service.ts b/apps/erp/app/modules/sales/sales.service.tsindex 6cd13b2a4f..8b6a530349 100644--- a/apps/erp/app/modules/sales/sales.service.ts+++ b/apps/erp/app/modules/sales/sales.service.ts@@ -776,7 +776,7 @@ export async function getQuotes(}query = setGenericQueryFilters(query, args, [- { column: "id", ascending: false },+ { column: "quoteId", ascending: false },]);return query;}@@ -1236,7 +1236,7 @@ export async function getSalesOrders(}query = setGenericQueryFilters(query, args, [- { column: "id", ascending: false },+ { column: "salesOrderId", ascending: false },]);return query;@@ -1380,7 +1380,7 @@ export async function getSalesRFQs(}query = setGenericQueryFilters(query, args, [- { column: "id", ascending: false },+ { column: "rfqId", ascending: false },]);return query;}diff --git a/apps/university/app/config.tsx b/apps/university/app/config.tsxindex fbe8346333..029d6031f5 100644--- a/apps/university/app/config.tsx+++ b/apps/university/app/config.tsx@@ -651,11 +651,11 @@ export const modules: Config = [{id: "digital-quotes",loomUrl:- "https://www.loom.com/share/51e0c6dd053b4a3e904fc795d4fc298f?sid=0bb2081d-6bc4-4efb-8361-d2717dda9781",+ "https://www.loom.com/share/c70ee886c10a4223a32c4deb438abd7f?sid=84183d2b-fc13-457b-9687-4ad4ef2ed932",name: "Digital Quotes",description:"Create professional digital quotes that can be easily shared with customers.",- duration: 0,+ duration: 177,},{id: "quote-revisions",diff --git a/packages/database/supabase/migrations/20250730181437_id-index.sql b/packages/database/supabase/migrations/20250730181437_id-index.sqlnew file mode 100644index 0000000000..c89f9e1f1c--- /dev/null+++ b/packages/database/supabase/migrations/20250730181437_id-index.sql@@ -0,0 +1,9 @@+-- Create indexes on readable ID columns for better query performance+CREATE INDEX IF NOT EXISTS "idx_purchaseOrder_purchaseOrderId" ON "purchaseOrder" ("purchaseOrderId");+CREATE INDEX IF NOT EXISTS "idx_salesOrder_salesOrderId" ON "salesOrder" ("salesOrderId");+CREATE INDEX IF NOT EXISTS "idx_quote_quoteId" ON "quote" ("quoteId");+CREATE INDEX IF NOT EXISTS "idx_salesRfq_salesRfqId" ON "salesRfq" ("rfqId");+CREATE INDEX IF NOT EXISTS "idx_job_jobId" ON "job" ("jobId");+CREATE INDEX IF NOT EXISTS "idx_supplierQuote_supplierQuoteId" ON "supplierQuote" ("supplierQuoteId");+CREATE INDEX IF NOT EXISTS "idx_salesInvoice_invoiceId" ON "salesInvoice" ("invoiceId");+CREATE INDEX IF NOT EXISTS "idx_purchaseInvoice_invoiceId" ON "purchaseInvoice" ("invoiceId");