Skip to content

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.

fix(custom-fields): name custom field groups after their screens

Raul3ad28116638f
diff --git a/packages/database/supabase/migrations/20261009163952_custom-field-group-names.sql b/packages/database/supabase/migrations/20261009163952_custom-field-group-names.sql
new file mode 100644
index 0000000000..8a8c48904e
--- /dev/null
+++ b/packages/database/supabase/migrations/20261009163952_custom-field-group-names.sql
@@ -0,0 +1,24 @@
+-- Settings -> Custom Fields lists each group by "customFieldTable"."name". Several
+-- names predate renames in the app; these match what the screens call each record.
+-- Keyed by "table", so a rerun changes nothing.
+UPDATE "customFieldTable"
+SET "name" = v."name"
+FROM (
+ VALUES
+ ('journal', 'Journal Entry'),
+ ('journalLine', 'Journal Entry Line'),
+ ('changeOrder', 'Change Notice'),
+ ('itemCost', 'Item Costing & Posting'),
+ ('itemPostingGroup', 'Item Group'),
+ ('itemReplenishment', 'Item Manufacturing'),
+ ('supplierPart', 'Supplier Part'),
+ ('itemUnitSalePrice', 'Item Sale Price'),
+ ('materialForm', 'Material Shape'),
+ ('enforcementRule', 'Storage & Sales Rule'),
+ ('supplierPayment', 'Supplier Payment Terms'),
+ ('salesRfq', 'Sales RFQ'),
+ ('salesRfqLine', 'Sales RFQ Line'),
+ ('salesInvoiceShipment', 'Sales Invoice Shipping'),
+ ('gaugeCalibrationRecord', 'Calibration Record')
+) AS v("table", "name")
+WHERE "customFieldTable"."table" = v."table";