/**Begin D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\BDM_constraint.sql **/
 EXEC P_ALTERPK 'PK_BDM_ESTATELEASE_INFO', 'T_BDM_ESTATELEASE_INFO', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BDM_ESTATE_INFO_CREATEORG') CREATE INDEX IDX_BDM_ESTATE_INFO_CREATEORG ON T_BDM_ESTATELEASE_INFO ( FCREATEORGID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BDM_ESTATE_INFO_MASTERID') CREATE INDEX IDX_BDM_ESTATE_INFO_MASTERID ON T_BDM_ESTATELEASE_INFO ( FMASTERID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BDM_ESTATE_INFO_NUMBER') CREATE  CLUSTERED INDEX IDX_BDM_ESTATE_INFO_NUMBER ON T_BDM_ESTATELEASE_INFO ( FNUMBER );


 EXEC P_ALTERPK 'PK_BDM_ESTATELEASE_INFO_L', 'T_BDM_ESTATELEASE_INFO_L', 'FPKID', '0';

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



/**End D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\BDM_constraint.sql **/
