/**Begin D:\tool\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_RIM_INVOICE_CLASS', 'T_RIM_INVOICE_CLASS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INVOICE_CLASS_USER') CREATE INDEX IDX_RIM_INVOICE_CLASS_USER ON T_RIM_INVOICE_CLASS ( FUSER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INVOICE_CLASS_DEFAULT') CREATE INDEX IDX_RIM_INVOICE_CLASS_DEFAULT ON T_RIM_INVOICE_CLASS ( FISDEFAULT );


 EXEC P_ALTERPK 'PK_T_RIM_INVOICE_CLASS_L', 'T_RIM_INVOICE_CLASS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_RIM_INVOICE_CLASS_CUSTO', 'T_RIM_INVOICE_CLASS_CUSTO', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INVOICE_CUSTO_CLASSID') CREATE INDEX IDX_RIM_INVOICE_CUSTO_CLASSID ON T_RIM_INVOICE_CLASS_CUSTO ( FINVOICE_CLASSID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_RIM_INVOICE_CUSTO_USER') CREATE INDEX IDX_RIM_INVOICE_CUSTO_USER ON T_RIM_INVOICE_CLASS_CUSTO ( FUSER );


 EXEC P_ALTERPK 'PK_T_RIM_INVOICE_MUL_CLASS', 'T_RIM_INVOICE_MUL_CLASS', 'FPKID', '1';

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



/**End D:\tool\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_constraint.sql **/
