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
61b66348
Commit
61b66348
authored
Feb 21, 2020
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove repository_storage column from snippets table
parent
9338931a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
3 deletions
+34
-3
app/models/snippet.rb
app/models/snippet.rb
+1
-1
changelogs/unreleased/fj-remove-repository-storage-column-from-snippets.yml
...sed/fj-remove-repository-storage-column-from-snippets.yml
+5
-0
db/post_migrate/20200221142216_remove_repository_storage_from_snippets.rb
...20200221142216_remove_repository_storage_from_snippets.rb
+28
-0
db/schema.rb
db/schema.rb
+0
-1
lib/gitlab/import_export/import_export.yml
lib/gitlab/import_export/import_export.yml
+0
-1
No files found.
app/models/snippet.rb
View file @
61b66348
...
@@ -17,7 +17,7 @@ class Snippet < ApplicationRecord
...
@@ -17,7 +17,7 @@ class Snippet < ApplicationRecord
include
HasRepository
include
HasRepository
extend
::
Gitlab
::
Utils
::
Override
extend
::
Gitlab
::
Utils
::
Override
ignore_column
:repository_storage
,
remove_with:
'12.10'
,
remove_after:
'2020-0
4
-22'
ignore_column
:repository_storage
,
remove_with:
'12.10'
,
remove_after:
'2020-0
3
-22'
cache_markdown_field
:title
,
pipeline: :single_line
cache_markdown_field
:title
,
pipeline: :single_line
cache_markdown_field
:description
cache_markdown_field
:description
...
...
changelogs/unreleased/fj-remove-repository-storage-column-from-snippets.yml
0 → 100644
View file @
61b66348
---
title
:
Remove repository_storage column from snippets
merge_request
:
25699
author
:
type
:
other
db/post_migrate/20200221142216_remove_repository_storage_from_snippets.rb
0 → 100644
View file @
61b66348
# 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
db/schema.rb
View file @
61b66348
...
@@ -3937,7 +3937,6 @@ ActiveRecord::Schema.define(version: 2020_02_21_144534) do
...
@@ -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"
,
limit:
255
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
.
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"
...
...
lib/gitlab/import_export/import_export.yml
View file @
61b66348
...
@@ -173,7 +173,6 @@ excluded_attributes:
...
@@ -173,7 +173,6 @@ excluded_attributes:
-
:secret
-
:secret
-
:encrypted_secret_token
-
:encrypted_secret_token
-
:encrypted_secret_token_iv
-
:encrypted_secret_token_iv
-
:repository_storage
merge_request_diff
:
merge_request_diff
:
-
:external_diff
-
:external_diff
-
:stored_externally
-
:stored_externally
...
...
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