/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_POLICY_A' AND KSQL_COL_NAME ='FASSETEXPENSE') 
 ALTER TABLE T_TCCIT_POLICY_A ADD (FASSETEXPENSE CHAR(1) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_JMSD_MIDD_APITUDE') 
 CREATE TABLE T_TCCIT_JMSD_MIDD_APITUDE (
FID BIGINT DEFAULT 0 NOT NULL,
FITEMNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FITEMNAME VARCHAR(200) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FSUMAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPARENTCODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCODE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCCIT_SEASONAL_POLICY' AND KSQL_COL_NAME ='FSUITTYPE') 
 ALTER TABLE T_TCCIT_SEASONAL_POLICY ADD (FSUITTYPE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCCIT_NONTAX_SUMMARY_M') 
 CREATE TABLE T_TCCIT_NONTAX_SUMMARY_M (
FID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSKSSQQ DATETIME,
FSKSSQZ DATETIME,
FNONTAXTOTAL DECIMAL(23,10) DEFAULT 0 NOT NULL,
FRULENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSEQ VARCHAR(50) DEFAULT ' ' NOT NULL,
FDISCOUNTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FRULEID BIGINT DEFAULT 0 NOT NULL
);

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