/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_DRAFT_EDIT') 
 CREATE TABLE T_TCCIT_DRAFT_EDIT (
FID BIGINT DEFAULT 0 NOT NULL,
FADJUSTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FITEMNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXORG BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FENTRYTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FTITLENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FITEMNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FRULEID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FPREADJUST DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPOSTADJUST DECIMAL(23,10) DEFAULT 0 NOT NULL,
FADJUSTEXPLAIN VARCHAR(1000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_ADJUST_DETAIL' AND KSQL_COL_NAME ='FADJUSTEXPLAIN') 
 ALTER TABLE T_TCCIT_ADJUST_DETAIL ADD (FADJUSTEXPLAIN VARCHAR(1000) DEFAULT ' ' NOT NULL );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_table.sql **/
