Reset project_push_rules id sequence to prevent UniqueViolation errors

Problem

The project_push_rules table was populated via a sync trigger from push_rules, which inserts records with explicit
IDs. This means the project_push_rules_id_seq sequence was never updated and likely remains at 1.

When we switch to using project_push_rules as the primary table (via feature flag), new records will use the
sequence directly. If the sequence is at 1 and migrated records exist with low IDs, we'll get PG::UniqueViolation
errors.

This is the same issue that occurred with group_push_rules on GitLab Dedicated instances (see !180953 (merged)).

Solution

Reset the project_push_rules sequence to MAX(id) + 1000 to ensure new inserts don't collide with existing records.

Timing

This migration must be completed before enabling the feature flag to switch reads/writes to project_push_rules.

Edited by Emma Park