/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_FA_CARD_BIZ_CTR', 'T_FA_CARD_BIZ_CTR', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_CARD_BIZ_CTR') CREATE INDEX IDX_FA_CARD_BIZ_CTR ON T_FA_CARD_BIZ_CTR ( FSRCBILLENTITYNAME ,FSRCBILLID );


 EXEC P_ALTERPK 'PK_T_FA_META_BILL_REALCARD_R', 'T_FA_META_BILL_REALCARD_R', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_META_BILL_REALCARD_R') CREATE UNIQUE INDEX IDX_FA_META_BILL_REALCARD_R ON T_FA_META_BILL_REALCARD_R ( FBILLENTITYNAME );


 EXEC P_ALTERPK 'PK_T_FA_CARD_BIZCTR_BILLSET', 'T_FA_CARD_BIZCTR_BILLSET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FA_CARD_BIZCTR_BILLSET') CREATE UNIQUE INDEX IDX_FA_CARD_BIZCTR_BILLSET ON T_FA_CARD_BIZCTR_BILLSET ( FBILLENTITYNAME ,FUSEPURPOSE );



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