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
7f59182d
Commit
7f59182d
authored
Jan 02, 2020
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Index elasticsearch_indexed_namespaces created_at
For find latest inserted records to rollback
parent
5c0b3a27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
db/migrate/20191225071320_add_index_to_elasticsearch_indexed_namespaces.rb
...25071320_add_index_to_elasticsearch_indexed_namespaces.rb
+17
-0
db/schema.rb
db/schema.rb
+1
-0
No files found.
db/migrate/20191225071320_add_index_to_elasticsearch_indexed_namespaces.rb
0 → 100644
View file @
7f59182d
# frozen_string_literal: true
class
AddIndexToElasticsearchIndexedNamespaces
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
(
:elasticsearch_indexed_namespaces
,
:created_at
)
end
def
down
remove_concurrent_index
(
:elasticsearch_indexed_namespaces
,
:created_at
)
end
end
db/schema.rb
View file @
7f59182d
...
...
@@ -1460,6 +1460,7 @@ ActiveRecord::Schema.define(version: 2020_01_02_170221) do
t
.
datetime_with_timezone
"created_at"
,
null:
false
t
.
datetime_with_timezone
"updated_at"
,
null:
false
t
.
integer
"namespace_id"
t
.
index
[
"created_at"
],
name:
"index_elasticsearch_indexed_namespaces_on_created_at"
t
.
index
[
"namespace_id"
],
name:
"index_elasticsearch_indexed_namespaces_on_namespace_id"
,
unique:
true
end
...
...
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