Commit 18d0f8fe authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'sh-re-add-template-column' into 'master'

Re-add template column to services table

See merge request gitlab-org/gitlab!24949
parents 45f8da1a 8ce185be
# frozen_string_literal: true
class ReaddTemplateColumnToServices < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
return if column_exists? :services, :template
# The migration to drop the template column never actually shipped
# to production, so we should be okay to re-add it without worrying
# about doing a data migration. If we needed to restore the value
# of `template`, we would look for entries with `project_id IS NULL`.
add_column_with_default :services, :template, :boolean, default: false, allow_null: true
end
def down
# NOP since the column is expected to exist
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_02_11_152410) do
ActiveRecord::Schema.define(version: 2020_02_12_052620) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment