Prepare partitioning constraint for ci_stages
Ref: #428988 (closed)
What does this MR do and why?
Following up !144167 (merged) where we successfully added this constraint for gitlab.com.
This MR adds a migration to create this new constraint for self-managed users.
This is a similar approach we used for ci_job_artifacts
in !144167 (merged).
Why are we doing this?
This is a prerequisite in order to partition this table.
Edited by Max Orefice