Commit
This commit is contained in:
+10
-1
@@ -119,7 +119,7 @@ create table if not exists schema_version (
|
||||
);
|
||||
|
||||
insert into schema_version (id, version, description)
|
||||
values (1, 6, 'Inspection modes, order range, and production allocation constraints')
|
||||
values (1, 7, 'Quality query indexes')
|
||||
on conflict (id) do update
|
||||
set version = excluded.version,
|
||||
description = excluded.description,
|
||||
@@ -255,6 +255,12 @@ on inspection_records(workpiece_id);
|
||||
create index if not exists ix_inspection_records_created_at
|
||||
on inspection_records(created_at);
|
||||
|
||||
create index if not exists ix_inspection_records_result
|
||||
on inspection_records(result_state, completed_at);
|
||||
|
||||
create index if not exists ix_inspection_records_order_side
|
||||
on inspection_records(order_id, inspection_side, completed_at);
|
||||
|
||||
do $$
|
||||
begin
|
||||
if exists (
|
||||
@@ -318,6 +324,9 @@ on workpiece_process_records(process_step);
|
||||
create index if not exists ix_process_records_started_at
|
||||
on workpiece_process_records(started_at);
|
||||
|
||||
create index if not exists ix_workpieces_order_state
|
||||
on workpieces(order_id, state);
|
||||
|
||||
-- Inspection mode migration for existing databases
|
||||
do $$
|
||||
begin
|
||||
|
||||
Reference in New Issue
Block a user