X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=sql%2FPg-upgrade2%2Frecorditem_active_price_source.sql;h=e8f502b77de4b53c1497f6d43b0f9953845db04a;hb=f7d8c6207aaf5fddf689a7c93c82adf81e9da6e1;hp=c391335b1a160fbcdd3c48663c3552f630d4a0c5;hpb=eebe8e90991eacadb6fbd20a648c152017a620c7;p=kivitendo-erp.git diff --git a/sql/Pg-upgrade2/recorditem_active_price_source.sql b/sql/Pg-upgrade2/recorditem_active_price_source.sql index c391335b1..e8f502b77 100644 --- a/sql/Pg-upgrade2/recorditem_active_price_source.sql +++ b/sql/Pg-upgrade2/recorditem_active_price_source.sql @@ -1,8 +1,12 @@ -- @tag: recorditem_active_price_source -- @description: Preisquelle in Belegpositionen --- @depends: release_2_6_2 +-- @depends: release_3_1_0 -- @encoding: utf-8 -ALTER TABLE orderitems ADD COLUMN active_price_source TEXT NOT NULL DEFAULT ''; +ALTER TABLE orderitems ADD COLUMN active_price_source TEXT NOT NULL DEFAULT ''; ALTER TABLE delivery_order_items ADD COLUMN active_price_source TEXT NOT NULL DEFAULT ''; -ALTER TABLE invoice ADD COLUMN active_price_source TEXT NOT NULL DEFAULT ''; +ALTER TABLE invoice ADD COLUMN active_price_source TEXT NOT NULL DEFAULT ''; + +UPDATE orderitems SET active_price_source = 'pricegroup/' || pricegroup_id WHERE pricegroup_id > 0; +UPDATE delivery_order_items SET active_price_source = 'pricegroup/' || pricegroup_id WHERE pricegroup_id > 0; +UPDATE invoice SET active_price_source = 'pricegroup/' || pricegroup_id WHERE pricegroup_id > 0;