kivitendo/sql/Pg-upgrade2/warehouse2.sql @ 7b1da9c3
c4563766 | Moritz Bunkus | -- @tag: warehouse2
|
||
3774d83b | Moritz Bunkus | -- @description: Defaultwert für onhand
|
||
c4563766 | Moritz Bunkus | -- @depends: warehouse
|
||
UPDATE parts SET onhand = COALESCE((SELECT SUM(qty) FROM inventory WHERE inventory.parts_id = parts.id), 0);
|
||||
ALTER TABLE parts ALTER COLUMN onhand SET DEFAULT 0;
|