• Stan Hu's avatar
    Re-add template column to services table · 8ce185be
    Stan Hu authored
    We attempted to revert the rename of the `template` to `instance` column
    in the `services` table in
    https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24857 and
    https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24885, but for
    some installations (e.g. staging), the `template` column had been
    dropped already because post-deploy migrations had finished.
    
    We never actually shipped this change to production, but for these
    environments we need to re-add the `template` column back into the table
    or project creation will fail.
    
    Note we do not do a data migration (e.g. set the `template` column to
    true for rows that have a NULL `project_id`) for two reasons:
    
    1. We don't want to insert a template by accident.
    2. This rename only finished on development/staging environments.
    
    Note that this migration happens in a post-deploy migration to ensure
    `20200211152410_remove_instance_from_services.rb` gets a chance
    to undo the migration first.
    8ce185be
20200212052620_readd_template_column_to_services.rb 709 Bytes