• Alex Kalderimis's avatar
    Update external wiki triggers to use new columns · 72c6d26f
    Alex Kalderimis authored
    Update the triggers for the functions that maintain the external wiki
    flag on the project table so that they check the new column values for
    the STI `type/type_new`.
    
    The migration ensures that there is no point at which one of the
    triggers is not installed, ensuring we do not allow rows to be inserted,
    updated or deleted without triggering one or other of the two versions
    of the trigger.
    
    A new temporary trigger is added, which handles the fact that we first
    insert rows with `type` set, and then later set `type_new` as part of
    the STI migration for the `integrations` table.
    
    Changelog: changed
    
    Fix project spec
    
    This uses a factory to ensure that the type/type_new columns are set
    correctly, and renames 'service' to 'integration' where appropriate.
    
    https://gitlab.com/gitlab-org/gitlab/-/issues/334127
    72c6d26f
20210813151908_replace_external_wiki_triggers.rb 2.26 KB