8d8e1b367cd5707380c9465b245d98b8312d05cc
[kivitendo-erp.git] / warehouse2.sql
1 -- @tag: warehouse2
2 -- @description: Defaultwert für onhand
3 -- @depends: warehouse
4 UPDATE parts SET onhand = COALESCE((SELECT SUM(qty) FROM inventory WHERE inventory.parts_id = parts.id), 0);
5 ALTER TABLE parts ALTER COLUMN onhand SET DEFAULT 0;