feat(production): 修改订单加工位置不一致问题
-创建订单时解除所有占用 -修改数据库位置唯一约束 -严格按照订单起始位置分配 -订单启动时重新初始化位置
This commit is contained in:
+1
-5
@@ -56,10 +56,6 @@ create table if not exists workpieces (
|
||||
updated_at timestamp not null default now()
|
||||
);
|
||||
|
||||
create unique index if not exists ux_workpieces_tray_position
|
||||
on workpieces(tray_id, tray_pos)
|
||||
where tray_id is not null and tray_pos > 0;
|
||||
|
||||
create table if not exists tray_slots (
|
||||
id bigserial primary key,
|
||||
tray_id bigint not null references trays(id) on delete cascade,
|
||||
@@ -119,7 +115,7 @@ create table if not exists schema_version (
|
||||
);
|
||||
|
||||
insert into schema_version (id, version, description)
|
||||
values (1, 10, 'Support reverse flip production checkpoints')
|
||||
values (1, 11, 'Allow historical workpieces to reuse tray positions')
|
||||
on conflict (id) do update
|
||||
set version = excluded.version,
|
||||
description = excluded.description,
|
||||
|
||||
Reference in New Issue
Block a user