Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/fundamend/sqlmodels/expression_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from typing import Optional

from efoli import EdifactFormat, EdifactFormatVersion
from sqlalchemy import Index

from fundamend.sqlmodels import AhbHierarchyMaterialized, Bedingung
from fundamend.sqlmodels.anwendungshandbuch import Paket, UbBedingung
Expand Down Expand Up @@ -229,6 +230,15 @@ class AhbExpression(SQLModel, table=True):
"expression",
name="idx_ahb_expressions_metadata_expression",
),
Index(
# this is to speed up the v_ahb_diff joins
"idx_ahb_expressions_covering_v_ahb_diff",
"edifact_format_version",
"format",
"expression",
"node_texts",
"ahbicht_error_message",
),
)
id: uuid.UUID = Field(primary_key=True, default_factory=uuid.uuid4)
edifact_format_version: EdifactFormatVersion = Field(index=True)
Expand Down