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
Boxiang Sun
gitlab-ce
Commits
c54494e2
Commit
c54494e2
authored
Sep 05, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make `identifier:` unique
parent
5e06c377
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb
...ate/20180831164908_add_identifier_to_prometheus_metric.rb
+2
-1
db/schema.rb
db/schema.rb
+1
-0
No files found.
db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb
View file @
c54494e2
...
...
@@ -6,6 +6,7 @@ class AddIdentifierToPrometheusMetric < ActiveRecord::Migration
DOWNTIME
=
false
def
change
add_column
:prometheus_metrics
,
:identifier
,
:string
,
unique:
true
add_column
:prometheus_metrics
,
:identifier
,
:string
add_index
:prometheus_metrics
,
:identifier
,
unique:
true
end
end
db/schema.rb
View file @
c54494e2
...
...
@@ -1712,6 +1712,7 @@ ActiveRecord::Schema.define(version: 20180831164909) do
add_index
"prometheus_metrics"
,
[
"common"
],
name:
"index_prometheus_metrics_on_common"
,
using: :btree
add_index
"prometheus_metrics"
,
[
"group"
],
name:
"index_prometheus_metrics_on_group"
,
using: :btree
add_index
"prometheus_metrics"
,
[
"identifier"
],
name:
"index_prometheus_metrics_on_identifier"
,
unique:
true
,
using: :btree
add_index
"prometheus_metrics"
,
[
"project_id"
],
name:
"index_prometheus_metrics_on_project_id"
,
using: :btree
create_table
"protected_branch_merge_access_levels"
,
force: :cascade
do
|
t
|
...
...
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