/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_constraint.sql **/

 EXEC P_ALTERPK 'PK_BAS_PRINTINGSCHEME_L', 'T_BAS_PRINTINGSCHEME_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_BAS_PRINTINGSCHEME', 'T_BAS_PRINTINGSCHEME', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_BAS_PRINTINGCONDITION', 'T_BAS_PRINTINGCONDITION', 'FENTRYID', '1';

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



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