alter table master_app_production.warehouses add wholesale_price_code smallint(6) after p_name_2;
alter table master_app_production.warehouses add invoice_price_code smallint(6) after wholesale_price_code;

update master_app_production.warehouses as w 
  left join master_app_production.warehouses_customers as wc on w.id=wc.warehouse_id
  left join master_app_production.customers as c on wc.customer_id=c.id
  set w.wholesale_price_code = c.wholesale_price_code;