• Stan Hu's avatar
    Fix db:check-schema in forks and shallow clones · d9b5d95b
    Stan Hu authored
    The `regenerate-schema` script attempts to find the merge base between
    the source and branch SHA to determine the right `db/structure.sql` to
    apply the migrations in the merge request. However, to get the merge
    base, we need the target SHA and the history between the source and
    target SHAs. Instead of downloading it via a curl request, we fetch the
    target branch and check out the `db/structure.sql` from there.
    
    Closes https://gitlab.com/gitlab-org/gitlab/-/issues/216214
    d9b5d95b
regenerate-schema 4.23 KB