SET wait_timeout=15000; 
SET autocommit = 0; 
START TRANSACTION;

ALTER TABLE `dir_prices_types` 
ADD COLUMN `prct_markup` DOUBLE NOT NULL DEFAULT 0 AFTER `prct_description`,
ADD COLUMN `prct_round` DOUBLE NOT NULL DEFAULT 0.01 AFTER `prct_markup`;

ALTER TABLE `dir_objects` 
ADD COLUMN `obj_rs` VARCHAR(30) NOT NULL AFTER `obj_date1`,
ADD COLUMN `obj_mfo` VARCHAR(30) NOT NULL AFTER `obj_rs`,
ADD COLUMN `obj_kpp` VARCHAR(30) NOT NULL AFTER `obj_mfo`,
ADD COLUMN `obj_bank` VARCHAR(200) NOT NULL AFTER `obj_kpp`;

ALTER TABLE `dir_customers` 
ADD COLUMN `cstm_bank` VARCHAR(200) NOT NULL AFTER `cstm_okpo`,
ADD COLUMN `cstm_mfo` VARCHAR(30) NOT NULL AFTER `cstm_bank`,
ADD COLUMN `cstm_rs` VARCHAR(30) NOT NULL AFTER `cstm_mfo`;

ALTER TABLE `dir_vendors` 
CHANGE COLUMN `ven_inn` `ven_inn` VARCHAR(30) NOT NULL ,
CHANGE COLUMN `ven_kpp` `ven_kpp` VARCHAR(30) NOT NULL ,
ADD COLUMN `ven_bank` VARCHAR(200) NOT NULL AFTER `ven_deleted`,
ADD COLUMN `ven_mfo` VARCHAR(30) NOT NULL AFTER `ven_bank`,
ADD COLUMN `ven_rs` VARCHAR(30) NOT NULL AFTER `ven_mfo`;



UPDATE sys_info SET si_version = "1.474" WHERE sys_info.si_id = 1;
COMMIT; 
SET autocommit = 1;