Commit e867812f authored by Francisco Javier López's avatar Francisco Javier López Committed by Andreas Brandl

Remove storage_version column from snippets

In this commit the storage_version column is
removed from the snippets table. It was wrongly
added and never needed
parent 30b200d8
---
title: Remove storage_version column from snippets
merge_request: 23315
author:
type: other
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class RemoveStorageVersionColumnFromSnippets < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
return unless column_exists?(:snippets, :storage_version)
remove_column :snippets, :storage_version
end
def down
return if column_exists?(:snippets, :storage_version)
add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault
:snippets,
:storage_version,
:integer,
default: 2,
allow_null: false
)
end
end
......@@ -3843,7 +3843,6 @@ ActiveRecord::Schema.define(version: 2020_01_21_132641) do
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.integer "storage_version", default: 2, 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"
......
......@@ -178,7 +178,6 @@ excluded_attributes:
- :encrypted_secret_token
- :encrypted_secret_token_iv
- :repository_storage
- :storage_version
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