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
28e1ce3a
Commit
28e1ce3a
authored
Jan 07, 2020
by
Francisco Javier López
Committed by
Andreas Brandl
Jan 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add migrations for version control snippets
Add columns `repository_storage` and `storage_version` to snippets.
parent
4f2af0e9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
0 deletions
+56
-0
changelogs/unreleased/fj-add-migrations-snippet-repository.yml
...elogs/unreleased/fj-add-migrations-snippet-repository.yml
+5
-0
db/migrate/20191218124915_add_repository_storage_to_snippets.rb
...rate/20191218124915_add_repository_storage_to_snippets.rb
+24
-0
db/migrate/20191218125015_add_storage_version_to_snippets.rb
db/migrate/20191218125015_add_storage_version_to_snippets.rb
+23
-0
db/schema.rb
db/schema.rb
+2
-0
lib/gitlab/import_export/import_export.yml
lib/gitlab/import_export/import_export.yml
+2
-0
No files found.
changelogs/unreleased/fj-add-migrations-snippet-repository.yml
0 → 100644
View file @
28e1ce3a
---
title
:
Add migrations for version control snippets
merge_request
:
22275
author
:
type
:
added
db/migrate/20191218124915_add_repository_storage_to_snippets.rb
0 → 100644
View file @
28e1ce3a
# frozen_string_literal: true
class
AddRepositoryStorageToSnippets
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_column_with_default
(
# rubocop:disable Migration/AddColumnWithDefault
:snippets
,
:repository_storage
,
:string
,
default:
'default'
,
limit:
255
,
allow_null:
false
)
end
def
down
remove_column
(
:snippets
,
:repository_storage
)
end
end
db/migrate/20191218125015_add_storage_version_to_snippets.rb
0 → 100644
View file @
28e1ce3a
# frozen_string_literal: true
class
AddStorageVersionToSnippets
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_column_with_default
(
# rubocop:disable Migration/AddColumnWithDefault
:snippets
,
:storage_version
,
:integer
,
default:
2
,
allow_null:
false
)
end
def
down
remove_column
(
:snippets
,
:storage_version
)
end
end
db/schema.rb
View file @
28e1ce3a
...
@@ -3803,6 +3803,8 @@ ActiveRecord::Schema.define(version: 2020_01_06_071113) do
...
@@ -3803,6 +3803,8 @@ ActiveRecord::Schema.define(version: 2020_01_06_071113) 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
.
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"
...
...
lib/gitlab/import_export/import_export.yml
View file @
28e1ce3a
...
@@ -172,6 +172,8 @@ excluded_attributes:
...
@@ -172,6 +172,8 @@ excluded_attributes:
-
:secret
-
:secret
-
:encrypted_secret_token
-
:encrypted_secret_token
-
:encrypted_secret_token_iv
-
:encrypted_secret_token_iv
-
:repository_storage
-
:storage_version
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