All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (pull_request) Successful in 22m41s
12 lines
344 B
SQL
12 lines
344 B
SQL
IF NOT EXISTS (
|
|
SELECT 1
|
|
FROM sys.indexes
|
|
WHERE name = 'IX_PhS_SalesDocumentDetails_Origin'
|
|
AND object_id = OBJECT_ID('dbo.PhS_SalesDocumentDetails')
|
|
)
|
|
BEGIN
|
|
CREATE INDEX IX_PhS_SalesDocumentDetails_Origin
|
|
ON dbo.PhS_SalesDocumentDetails (origin_type, origin_id)
|
|
INCLUDE (salesdocument_id, quantity);
|
|
END;
|