| | |
| | | `update_user` int NULL DEFAULT NULL, |
| | | PRIMARY KEY (`id`) |
| | | ) COMMENT = 'è½æºç±»å-è½èæè¡¨æç»_éä»¶'; |
| | | |
| | | alter table product_order |
| | | drop column sales_ledger_id, |
| | | drop column sale_ledger_product_id, |
| | | drop column product_model_id; |
| | | |
| | | alter table production_plan |
| | | add assigned_quantity DECIMAL(10, 4) default 0 not null COMMENT 'ä¸åæ°é'; |
| | | |
| | | alter table product_order |
| | | add plan_complete_time datetime(0) NULL DEFAULT NULL COMMENT '计å宿æ¶é´'; |
| | | |
| | | # ç产订åä¸ç产计åå
³è表 |
| | | drop table if exists product_order_plan; |
| | | create table product_order_plan |
| | | ( |
| | | id bigint auto_increment primary key, |
| | | product_order_id bigint not null default 0 comment 'ç产订åid', |
| | | production_plan_id bigint not null default 0 comment 'ç产计åid', |
| | | create_time datetime null comment 'å½å
¥æ¶é´', |
| | | update_time datetime null comment 'æ´æ°æ¶é´', |
| | | index idx_product_order_id (product_order_id), |
| | | index idx_production_plan_id (production_plan_id), |
| | | unique idx_product_order_production_plan (product_order_id, production_plan_id) |
| | | ); |