/**Begin D:\Users\rd_william_li\Documents\lipin\PDM\PDM_UPGRADE\PDM_UPGRADE\pdm_new\BOS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_PERM_ADMINDOMAIN', 'T_PERM_ADMINDOMAIN', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_PERM_ADMINDOMAIN_L', 'T_PERM_ADMINDOMAIN_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PERM_ADMINDOMAIN_L') CREATE INDEX IDX_PERM_ADMINDOMAIN_L ON T_PERM_ADMINDOMAIN_L ( FLOCALEID );


 EXEC P_ALTERPK 'PK_T_PERM_ADMINDOMAINRANGE', 'T_PERM_ADMINDOMAINRANGE', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PERM_ADMINDOMAINRANGE') CREATE INDEX IDX_PERM_ADMINDOMAINRANGE ON T_PERM_ADMINDOMAINRANGE ( FAPPID ,FENTITYNUM ,FPERMITEMID );


/**End D:\Users\rd_william_li\Documents\lipin\PDM\PDM_UPGRADE\PDM_UPGRADE\pdm_new\BOS_constraint.sql **/
