rm24070_it_is_possible_to_create_a_da_for_a_single-kit-header
Table of Contents
rm24070 It is possible to create a DA for a Single-KIT-Header
TODO
- + Analyze what is to do
- + Create new branch topic/rm#24070_DaForSingleKitHeader
- - Change SQL columns
- + add column
CISKIT - + change column definition of
CISKITWITHOUTCOMPS(declared inD:\dev\git\airsupply\airsupply-integration\src\test\resources\sqltestdata\airsupply\baseline\V0.0.0.0.1__baseline.fly.sql) - + write an SQL script to calculate
CISKIT
- x Change Model (POBaseModel?) → not necessary
- - Change
POImportXMLHandler- during the import calculate the flag
header.isKit(at the moment it is the flagPOImportXMLHandler.bIsKit). It can be done during import of positions, because the first time this flag is read after the positions are processed.
SQL
Create column cKIT:
ALTER TABLE TAIRPOHEADER ADD CISKIT NUMBER(1,0) DEFAULT 0;
Fill cKIT with data:
UPDATE tAIRPOHEADER SET CISKIT=1 WHERE cHeaderID IN (SELECT cRefHeaderId FROM TAIRPOSCHEDULE WHERE CKITHEADER>0 OR CKITCOMPONENT>0 GROUP BY cRefHeaderId);
(Optional) Remove index, which uses column CISKITWITHOUTCOMPS:
DROP INDEX IDX_POHEAD_KITWITHOUTCOMP;
Modify column CISKITWITHOUTCOMPS:
ALTER TABLE TAIRPOHEADER MODIFY CISKITWITHOUTCOMPS NUMBER GENERATED ALWAYS AS (CASE WHEN (CISKIT=1 AND CKITCOMPONENTCOUNT=0) THEN 1 ELSE 0 END) VIRTUAL VISIBLE;
(Optional) After that create index again:
CREATE INDEX IDX_POHEAD_KITWITHOUTCOMP ON TAIRPOHEADER(CISKITWITHOUTCOMPS);
rm24070_it_is_possible_to_create_a_da_for_a_single-kit-header.txt · Last modified: by kalaschnikow
