/**Begin D:\PDMTOOLS\PDM_UPGRADE_1.3\PDM_UPGRADE\PDM1\TCTB_constraint.sql **/
 EXEC P_ALTERPK 'PK_TCTB_REMIND_ASSIST', 'T_TCTB_REMIND_ASSIST', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_REMIND_ASSIST_FNUMBER') CREATE INDEX IDX_REMIND_ASSIST_FNUMBER ON T_TCTB_REMIND_ASSIST ( FNUMBER );


 EXEC P_ALTERPK 'PK_TCTB_REMIND_ASSIST_DET', 'T_TCTB_REMIND_ASSIST_DET', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_REMIND_ASSIST_L', 'T_TCTB_REMIND_ASSIST_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCTB_REMIND_ASSIST_L_0') CREATE INDEX IDX_TCTB_REMIND_ASSIST_L_0 ON T_TCTB_REMIND_ASSIST_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_TCTB_REMIND_BIZSYSROLE', 'T_TCTB_REMIND_BIZSYSROLE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_REMIND_CCUSER', 'T_TCTB_REMIND_CCUSER', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_REMIND_COMMSYSROLE', 'T_TCTB_REMIND_COMMSYSROLE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_REMIND_ORG_RANGE', 'T_TCTB_REMIND_ORG_RANGE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_REMIND_RULE', 'T_TCTB_REMIND_RULE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_REMIND_TASK', 'T_TCTB_REMIND_TASK', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_REMIND_TASK_FNUMBER') CREATE INDEX IDX_REMIND_TASK_FNUMBER ON T_TCTB_REMIND_TASK ( FNUMBER ,FSHEDULEPLANID ,FSUBSCRIBE );


 EXEC P_ALTERPK 'PK_TCTB_REMIND_TASK_L', 'T_TCTB_REMIND_TASK_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCTB_REMIND_TASK_L_0') CREATE INDEX IDX_TCTB_REMIND_TASK_L_0 ON T_TCTB_REMIND_TASK_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_TCTB_REMIND_TREE', 'T_TCTB_REMIND_TREE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_REMIND_TREE_NUMBER_LONG') CREATE INDEX IDX_REMIND_TREE_NUMBER_LONG ON T_TCTB_REMIND_TREE ( FNUMBER ,FLONGNUMBER );


 EXEC P_ALTERPK 'PK_TCTB_REMIND_TREE_L', 'T_TCTB_REMIND_TREE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCTB_REMIND_TREE_L_0') CREATE INDEX IDX_TCTB_REMIND_TREE_L_0 ON T_TCTB_REMIND_TREE_L ( FID ,FLOCALEID );



/**End D:\PDMTOOLS\PDM_UPGRADE_1.3\PDM_UPGRADE\PDM1\TCTB_constraint.sql **/
