From: Jan Büren Date: Thu, 3 Mar 2022 12:31:44 +0000 (+0100) Subject: qty real nach numeric migrieren Ticket #491 X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~162 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b403498c677894ec7802563777b754e3c26df875;p=kivitendo-erp.git qty real nach numeric migrieren Ticket #491 --- diff --git a/SL/DB/MetaSetup/InvoiceItem.pm b/SL/DB/MetaSetup/InvoiceItem.pm index 85b8876be..8a67022fc 100644 --- a/SL/DB/MetaSetup/InvoiceItem.pm +++ b/SL/DB/MetaSetup/InvoiceItem.pm @@ -35,7 +35,7 @@ __PACKAGE__->meta->columns( price_factor_id => { type => 'integer' }, pricegroup_id => { type => 'integer' }, project_id => { type => 'integer' }, - qty => { type => 'float', precision => 4, scale => 4 }, + qty => { type => 'numeric', precision => 25, scale => 5 }, sellprice => { type => 'numeric', precision => 15, scale => 5 }, serialnumber => { type => 'text' }, subtotal => { type => 'boolean', default => 'false' }, diff --git a/SL/DB/MetaSetup/OrderItem.pm b/SL/DB/MetaSetup/OrderItem.pm index afa64d815..e83b65bda 100644 --- a/SL/DB/MetaSetup/OrderItem.pm +++ b/SL/DB/MetaSetup/OrderItem.pm @@ -31,7 +31,7 @@ __PACKAGE__->meta->columns( price_factor_id => { type => 'integer' }, pricegroup_id => { type => 'integer' }, project_id => { type => 'integer' }, - qty => { type => 'float', precision => 4, scale => 4 }, + qty => { type => 'numeric', precision => 25, scale => 5 }, reqdate => { type => 'date' }, sellprice => { type => 'numeric', precision => 15, scale => 5 }, serialnumber => { type => 'text' }, diff --git a/sql/Pg-upgrade2/convert_real_qty.sql b/sql/Pg-upgrade2/convert_real_qty.sql new file mode 100644 index 000000000..5e0ea6531 --- /dev/null +++ b/sql/Pg-upgrade2/convert_real_qty.sql @@ -0,0 +1,7 @@ +-- @tag: convert_real_qty +-- @description: Spaltentyp auf Numeric anstelle von Real für qty +-- @depends: release_3_6_0 +ALTER TABLE orderitems ALTER column qty type numeric(25,5); +ALTER TABLE invoice ALTER column qty type numeric(25,5); + +