Remove repository_storage column from snippets table

parent 9338931a
......@@ -17,7 +17,7 @@ class Snippet < ApplicationRecord
include HasRepository
extend ::Gitlab::Utils::Override
ignore_column :repository_storage, remove_with: '12.10', remove_after: '2020-04-22'
ignore_column :repository_storage, remove_with: '12.10', remove_after: '2020-03-22'
cache_markdown_field :title, pipeline: :single_line
cache_markdown_field :description
......
---
title: Remove repository_storage column from snippets
merge_request: 25699
author:
type: other
# frozen_string_literal: true
class RemoveRepositoryStorageFromSnippets < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
return unless column_exists?(:snippets, :repository_storage)
remove_column :snippets, :repository_storage
end
def down
return if column_exists?(:snippets, :repository_storage)
add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault
:snippets,
:repository_storage,
:string,
default: 'default',
limit: 255,
allow_null: false
)
end
end
......@@ -3937,7 +3937,6 @@ ActiveRecord::Schema.define(version: 2020_02_21_144534) do
t.string "encrypted_secret_token", limit: 255
t.string "encrypted_secret_token_iv", limit: 255
t.boolean "secret", default: false, null: false
t.string "repository_storage", limit: 255, default: "default", null: false
t.index ["author_id"], name: "index_snippets_on_author_id"
t.index ["content"], name: "index_snippets_on_content_trigram", opclass: :gin_trgm_ops, using: :gin
t.index ["created_at"], name: "index_snippets_on_created_at"
......
......@@ -173,7 +173,6 @@ excluded_attributes:
- :secret
- :encrypted_secret_token
- :encrypted_secret_token_iv
- :repository_storage
merge_request_diff:
- :external_diff
- :stored_externally
......
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