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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
705022d1
Commit
705022d1
authored
Dec 22, 2017
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cache_index migration
parent
b3f27aed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
db/migrate/20171222183504_add_cache_index_to_project.rb
db/migrate/20171222183504_add_cache_index_to_project.rb
+19
-0
db/schema.rb
db/schema.rb
+2
-1
No files found.
db/migrate/20171222183504_add_cache_index_to_project.rb
0 → 100644
View file @
705022d1
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddCacheIndexToProject
<
ActiveRecord
::
Migration
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
(
:projects
,
:cache_index
,
:integer
,
default:
0
)
end
def
down
remove_column
(
:projects
,
:cache_index
)
end
end
db/schema.rb
View file @
705022d1
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,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:
2017122
0191323
)
do
ActiveRecord
::
Schema
.
define
(
version:
2017122
2183504
)
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
"plpgsql"
enable_extension
"plpgsql"
...
@@ -1447,6 +1447,7 @@ ActiveRecord::Schema.define(version: 20171220191323) do
...
@@ -1447,6 +1447,7 @@ ActiveRecord::Schema.define(version: 20171220191323) do
t
.
boolean
"repository_read_only"
t
.
boolean
"repository_read_only"
t
.
boolean
"merge_requests_ff_only_enabled"
,
default:
false
t
.
boolean
"merge_requests_ff_only_enabled"
,
default:
false
t
.
boolean
"merge_requests_rebase_enabled"
,
default:
false
,
null:
false
t
.
boolean
"merge_requests_rebase_enabled"
,
default:
false
,
null:
false
t
.
integer
"cache_index"
,
default:
0
,
null:
false
end
end
add_index
"projects"
,
[
"ci_id"
],
name:
"index_projects_on_ci_id"
,
using: :btree
add_index
"projects"
,
[
"ci_id"
],
name:
"index_projects_on_ci_id"
,
using: :btree
...
...
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