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
8cfba7db
Commit
8cfba7db
authored
Mar 04, 2022
by
Jonathan Schafer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unique index for security training providers
Changelog: changed
parent
58a328ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
db/post_migrate/20220304201847_add_unique_index_on_security_training_providers.rb
...201847_add_unique_index_on_security_training_providers.rb
+15
-0
db/schema_migrations/20220304201847
db/schema_migrations/20220304201847
+1
-0
db/structure.sql
db/structure.sql
+2
-0
No files found.
db/post_migrate/20220304201847_add_unique_index_on_security_training_providers.rb
0 → 100644
View file @
8cfba7db
# frozen_string_literal: true
class
AddUniqueIndexOnSecurityTrainingProviders
<
Gitlab
::
Database
::
Migration
[
1.0
]
INDEX_NAME
=
'index_security_training_providers_on_unique_name'
disable_ddl_transaction!
def
up
add_concurrent_index
:security_training_providers
,
:name
,
unique:
true
,
name:
INDEX_NAME
end
def
down
remove_concurrent_index_by_name
:security_training_providers
,
INDEX_NAME
end
end
db/schema_migrations/20220304201847
0 → 100644
View file @
8cfba7db
d60a313ac68b0edfe1ae219690aacbe74c038b90bc4239f67d14f9ced36d67f6
\ No newline at end of file
db/structure.sql
View file @
8cfba7db
...
...
@@ -28954,6 +28954,8 @@ CREATE INDEX index_security_scans_on_pipeline_id ON security_scans USING btree (
CREATE INDEX index_security_scans_on_project_id ON security_scans USING btree (project_id);
CREATE UNIQUE INDEX index_security_training_providers_on_unique_name ON security_training_providers USING btree (name);
CREATE INDEX index_security_trainings_on_project_id ON security_trainings USING btree (project_id);
CREATE INDEX index_security_trainings_on_provider_id ON security_trainings USING btree (provider_id);
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