• Furkan Ayhan's avatar
    Add foreign key to ci_builds runner_id · 53884146
    Furkan Ayhan authored
    When a runner gets deleted, jobs that were run with it still have
    runner_id. With this commit, they will start to 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 1st step.
    
    Changelog: other
    53884146
schema_spec.rb 12.7 KB