-- v4.12_service_order_soft_delete.sql
-- Soft-delete support for service orders.

ALTER TABLE service_orders
    ADD COLUMN IF NOT EXISTS is_deleted BOOLEAN NOT NULL DEFAULT FALSE;

CREATE INDEX IF NOT EXISTS idx_service_orders_is_deleted
    ON service_orders (is_deleted);

-- Exclude deleted orders from common queries by default via partial index helpers
-- (application filters explicitly).
