
alter table master_app_production.products add safe_factor decimal(16,3) after purchase_quantity;
alter table master_app_production.products add read_time int(11) after purchase_quantity;

alter table master_app_production.product_sets add safe_factor decimal(16,3) after supplier_id;
alter table master_app_production.product_sets add read_time int(11) after supplier_id;

alter table master_app_production.wholesale_prices add safe_factor decimal(16,3) after pms;
alter table master_app_production.wholesale_prices add read_time int(11) after pms;

update master_app_production.product_sets set safe_factor=1;
update master_app_production.product_sets set read_time=4;

update master_app_production.products set safe_factor=0;
update master_app_production.products set read_time=0;

update master_app_production.wholesale_prices set safe_factor=1;
update master_app_production.wholesale_prices set read_time=1;

INSERT INTO menus SET id=94, menu_category_id=7, name='own_order_point_lists', disp_name='自社在庫発注点', disp_sort=79, created_at=NOW(), updated_at=NOW();
INSERT INTO menus SET id=95, menu_category_id=7, name='other_order_point_lists', disp_name='貸出在庫発注点', disp_sort=80, created_at=NOW(), updated_at=NOW();
INSERT INTO menus SET id=96, menu_category_id=7, name='non_active_lists', disp_name='仕様別不稼働在庫', disp_sort=81, created_at=NOW(), updated_at=NOW();

INSERT INTO `roles_menus` (`created_at`, `updated_at`, `role_id`, `menu_id`, `auth_code`) VALUES(NOW(), NOW(), 3, 94, 1);
INSERT INTO `roles_menus` (`created_at`, `updated_at`, `role_id`, `menu_id`, `auth_code`) VALUES(NOW(), NOW(), 3, 95, 1);
INSERT INTO `roles_menus` (`created_at`, `updated_at`, `role_id`, `menu_id`, `auth_code`) VALUES(NOW(), NOW(), 3, 96, 1);

