/**Begin C:\Users\rd_xiang_qiu\Desktop\PDM规范\PDM_UPGRADE\pdm1\BOS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BAS_INVOICE', 'T_BAS_INVOICE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_BAS_INVOICE') CREATE INDEX INDEX_BAS_INVOICE ON T_BAS_INVOICE ( FBILLID );


 EXEC P_ALTERPK 'PK_T_BAS_INVOICEENTRYKEY', 'T_BAS_INVOICEENTRYKEY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_BAS_INVOICEENTRYKEY') CREATE INDEX INDEX_BAS_INVOICEENTRYKEY ON T_BAS_INVOICEENTRYKEY ( FID );


 EXEC P_ALTERPK 'PK_T_BAS_INVOICEKEY', 'T_BAS_INVOICEKEY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_BAS_INVOICEKEY') CREATE INDEX INDEX_BAS_INVOICEKEY ON T_BAS_INVOICEKEY ( FID );


 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_YZJ_USER_TASKBTUSER') CREATE INDEX IDX_YZJ_USER_TASKBTUSER ON T_YZJ_USER ( FTASKID ,FBACKUPTYPE ,FUSERID );


/**End C:\Users\rd_xiang_qiu\Desktop\PDM规范\PDM_UPGRADE\pdm1\BOS_constraint.sql **/
