/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_CARD_BUS_CTR_DETAIL') 
 CREATE TABLE T_FA_CARD_BUS_CTR_DETAIL (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDTHOLDLOCKENTITYNAME NVARCHAR(36) DEFAULT ' ' NOT NULL,
FDTHOLDLOCKDATAID BIGINT DEFAULT 0 NOT NULL,
FDTMODIFYTIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CARD_BUS_CTR' AND KSQL_COL_NAME ='FSUBLOCKNUM') 
 ALTER TABLE T_FA_CARD_BUS_CTR ADD (FSUBLOCKNUM BIGINT DEFAULT 0 NOT NULL );

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