From: G. Richardson Date: Tue, 31 Jan 2017 11:13:32 +0000 (+0100) Subject: Inventory: shippingdate darf nicht leer sein X-Git-Tag: release-3.5.4~1603 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=96def4ca5bca620506a0859d48b3df54290e8202;p=kivitendo-erp.git Inventory: shippingdate darf nicht leer sein Nachtrag zu Commit 8fd886849e68f --- diff --git a/SL/DB/MetaSetup/Inventory.pm b/SL/DB/MetaSetup/Inventory.pm index 14d1ea158..25530047b 100644 --- a/SL/DB/MetaSetup/Inventory.pm +++ b/SL/DB/MetaSetup/Inventory.pm @@ -23,7 +23,7 @@ __PACKAGE__->meta->columns( parts_id => { type => 'integer', not_null => 1 }, project_id => { type => 'integer' }, qty => { type => 'numeric', precision => 25, scale => 5 }, - shippingdate => { type => 'date' }, + shippingdate => { type => 'date', not_null => 1 }, trans_id => { type => 'integer', not_null => 1 }, trans_type_id => { type => 'integer', not_null => 1 }, warehouse_id => { type => 'integer', not_null => 1 }, diff --git a/sql/Pg-upgrade2/inventory_shippingdate_not_null.sql b/sql/Pg-upgrade2/inventory_shippingdate_not_null.sql new file mode 100644 index 000000000..afb061705 --- /dev/null +++ b/sql/Pg-upgrade2/inventory_shippingdate_not_null.sql @@ -0,0 +1,7 @@ +-- @tag: inventory_shippingdate_not_null +-- @description: shippingdate not null, leeres shippingdate für nachträglich wie itime setzen +-- @depends: release_3_4_0 inventory_fix_shippingdate_assemblies +-- @encoding: utf-8 + +UPDATE inventory SET shippingdate = itime WHERE shippingdate IS NULL; +ALTER TABLE inventory ALTER COLUMN shippingdate SET NOT NULL;