• Furkan Ayhan's avatar
    Add nullify job for orphan runner_id columns of ci_builds · b44fac47
    Furkan Ayhan authored
    When a runner gets deleted, jobs that were run with it still have
    runner_id. With this commit, old data will be nullified.
    
    There will be 3 steps;
    1. Add a NOT VALID foreign key constraint to the column to ensure
    GitLab doesn't create inconsistent records.
    2. Add a data migration, to fix or clean up existing records.
    3. Validate the whole table by making the foreign key VALID.
    
    This is the 2nd step.
    
    Changelog: other
    b44fac47
nullify_orphan_runner_id_on_ci_builds_spec.rb 1.85 KB