Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a279f44f
Commit
a279f44f
authored
Jan 16, 2020
by
Francisco Javier López
Committed by
Andreas Brandl
Jan 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove storage_version column from snippets
parent
cf190b00
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
changelogs/unreleased/fj-remove-storage-version-from-snippets.yml
...gs/unreleased/fj-remove-storage-version-from-snippets.yml
+5
-0
db/post_migrate/20200114180546_remove_storage_version_column_from_snippets.rb
...0114180546_remove_storage_version_column_from_snippets.rb
+25
-0
db/schema.rb
db/schema.rb
+1
-2
No files found.
changelogs/unreleased/fj-remove-storage-version-from-snippets.yml
0 → 100644
View file @
a279f44f
---
title
:
Remove storage_version column from snippets
merge_request
:
23004
author
:
type
:
changed
db/post_migrate/20200114180546_remove_storage_version_column_from_snippets.rb
0 → 100644
View file @
a279f44f
# frozen_string_literal: true
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
add_column_with_default
(
# rubocop:disable Migration/AddColumnWithDefault
:snippets
,
:storage_version
,
:integer
,
default:
2
,
allow_null:
false
)
end
end
db/schema.rb
View file @
a279f44f
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#
#
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2020_01_14_1
13341
)
do
ActiveRecord
::
Schema
.
define
(
version:
2020_01_14_1
80546
)
do
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension
"pg_trgm"
enable_extension
"pg_trgm"
...
@@ -3838,7 +3838,6 @@ ActiveRecord::Schema.define(version: 2020_01_14_113341) do
...
@@ -3838,7 +3838,6 @@ ActiveRecord::Schema.define(version: 2020_01_14_113341) do
t
.
string
"encrypted_secret_token_iv"
,
limit:
255
t
.
string
"encrypted_secret_token_iv"
,
limit:
255
t
.
boolean
"secret"
,
default:
false
,
null:
false
t
.
boolean
"secret"
,
default:
false
,
null:
false
t
.
string
"repository_storage"
,
limit:
255
,
default:
"default"
,
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
[
"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
[
"content"
],
name:
"index_snippets_on_content_trigram"
,
opclass: :gin_trgm_ops
,
using: :gin
t
.
index
[
"created_at"
],
name:
"index_snippets_on_created_at"
t
.
index
[
"created_at"
],
name:
"index_snippets_on_created_at"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment