/*ALIAS>prop_db*/

/*ManyStart>2460*/
ALTER TABLE VALUTI DROP CONSTRAINT INTEG_132;

ALTER TABLE VALUTI
ADD CONSTRAINT PK_VALUTI
PRIMARY KEY (VAL_DATE)
USING DESCENDING INDEX PK_VALUTIIDX;

CREATE INDEX INDETAILFAKE_IDX1
ON INDETAILFAKE (IDF_INID);

CREATE INDEX BINS_IDX1
ON BINS (BIN_NO);

CREATE INDEX PERSONS_IDX1
ON PERSONS (PER_MOL);

CREATE INDEX INVOICES_IDX1
ON INVOICES (IN_PAYTYPE);

CREATE INDEX INVOICES_IDX3
ON INVOICES (IN_OPERATORID);

CREATE INDEX DAYPAYMENTS_IDX1
ON DAYPAYMENTS (DP_INID);

CREATE INDEX DAYPAYMENTS_IDX2
ON DAYPAYMENTS (DP_OPID);

CREATE INDEX DAYPAYMENTS_IDX3
ON DAYPAYMENTS (DP_FLAG);

CREATE INDEX DAYPAYMENTS_IDX4
ON DAYPAYMENTS (DP_DATE);

CREATE INDEX DAYPAYMENTS_IDX5
ON DAYPAYMENTS (DP_ACCNO);

CREATE INDEX DAYPAYMENTS_IDX6
ON DAYPAYMENTS (DP_PARTNO);

CREATE INDEX DAYPAYMENTS_IDX7
ON DAYPAYMENTS (DP_PAYWAY);

CREATE INDEX DAYPAYMENTS_IDX8
ON DAYPAYMENTS (DP_PAYTYPE);

DROP INDEX DAYPAYUNIQUE;

CREATE INDEX DEPTOR_IDX_STATE
ON DEPTOR (D_STATE);

CREATE INDEX TAXIGROUPS_IDX_ACTIVE
ON TAXIGROUPS (TG_ACTIVE);

CREATE INDEX TAXIGROUPS_IDX_TYPE
ON TAXIGROUPS (TG_TYPE);

CREATE INDEX TAXI_IDX_TG_ID
ON TAXI (TAX_TGID);

CREATE INDEX TAXI_IDX_ACTIVE
ON TAXI (TAX_ACTIVE);

CREATE INDEX TAXI_IDX_ACCNO
ON TAXI (TAX_ACCNO);

CREATE INDEX TAXI_IDX_LIHVA
ON TAXI (TAX_LIHVA);

CREATE INDEX TAXI_IDX_DDS
ON TAXI (TAX_DDS);

CREATE INDEX TAXI_IDX_ACCNO_L
ON TAXI (TAX_ACCNO_L);

CREATE INDEX TAXI_IDX_ACCNO_D
ON TAXI (TAX_ACCNO_D);

CREATE INDEX TAXORDERS_IDX_TAXID
ON TAXORDERS (TO_TAXID);

CREATE INDEX TAXORDERS_IDX_PAID
ON TAXORDERS (TO_PAID);

CREATE INDEX DAYFINISH_IDX_OPID
ON DAYFINISH (DF_OPERATORID);

CREATE INDEX RENTTYPES_IDX_TYPE
ON RENTTYPES (RT_TYPE);

CREATE INDEX NUMKINDDOC_NOM_IDX1
ON NUMKINDDOC_NOM (NUMKIND_ACTIVE);

CREATE INDEX CHARACTERISTICS_IDX1
ON CHARACTERISTICS (CH_APP);

CREATE INDEX RENTKONS_IDX1
ON RENTKONS (RT_ID);

CREATE INDEX GROUP_KL_IDX1
ON GROUP_KL (G_TEXT);
/*ManyStop>*/

/*ManyStart>2462*/
execute procedure ClearBadInvoices;
drop procedure ClearBadInvoices;
/*ManyStop*/

/*SQLStart>2464*/
	update system_strings set sys_str = '6.7.193.1' where sys_id = 1401;  /*BackOffice*/
/*SQLStop*/