-- V4: add created_by column to deployments for audit trail
-- Captures which user initiated a deployment. Nullable for backwards compatibility;
-- pre-V4 historical deployments will have NULL.

ALTER TABLE deployments
    ADD COLUMN created_by TEXT REFERENCES users(user_id);

CREATE INDEX idx_deployments_created_by ON deployments (created_by);
