huminmin
3 天以前 2495a8e1f71b6a0908a423765aaafd9ae0140d0c
doc/ÄþÏÄ-ÖÐÊ¢½¨²Ä.sql
@@ -82,3 +82,28 @@
    `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)
);