سامانه صدور فاکتور و حسابداری

perf: cover request workflow foreign keys

davoodmehraban89 committed Oct 1, 2026 at 22:42 UTC 50ceb583c3bef991092ddcded6f766d3799a90a5
1 file changed +9
supabase/migrations/20261001224500_request_workflow_d2_fk_indexes.sql new
+9
@@ -0,0 +1,9 @@
1 +-- Slice D2: cover request-workflow foreign keys reported by the production performance advisor.
2 +create index if not exists request_instance_events_actor_user_idx on public.request_instance_events(actor_user_id);
3 +create index if not exists request_instance_events_request_instance_fk_idx on public.request_instance_events(request_instance_id);
4 +create index if not exists request_instances_request_type_version_idx on public.request_instances(request_type_version_id);
5 +create index if not exists request_instances_requester_user_idx on public.request_instances(requester_user_id);
6 +create index if not exists request_instances_workflow_version_idx on public.request_instances(workflow_version_id);
7 +create index if not exists request_type_definitions_created_by_idx on public.request_type_definitions(created_by);
8 +create index if not exists request_type_versions_published_by_idx on public.request_type_versions(published_by);
9 +create index if not exists request_workflow_versions_published_by_idx on public.request_workflow_versions(published_by);