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
849927a1
Commit
849927a1
authored
Feb 07, 2019
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ChatOps migrations to Core
parent
69df085e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
db/migrate/20180209115333_create_chatops_tables.rb
db/migrate/20180209115333_create_chatops_tables.rb
+3
-3
ee/db/migrate/20181105122803_add_missing_indexes_for_foreign_keys_ee.rb
...20181105122803_add_missing_indexes_for_foreign_keys_ee.rb
+5
-2
No files found.
ee/
db/migrate/20180209115333_create_chatops_tables.rb
→
db/migrate/20180209115333_create_chatops_tables.rb
View file @
849927a1
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
# frozen_string_literal: true
class
CreateChatopsTables
<
ActiveRecord
::
Migration
[
4.2
]
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
def
change
...
...
@@ -16,6 +14,8 @@ class CreateChatopsTables < ActiveRecord::Migration[4.2]
# A pipeline can only contain one row in this table, hence this index is
# unique.
t
.
index
:pipeline_id
,
unique:
true
t
.
index
:chat_name_id
end
# rubocop:disable Migration/AddConcurrentForeignKey
...
...
ee/db/migrate/20181105122803_add_missing_indexes_for_foreign_keys_ee.rb
View file @
849927a1
...
...
@@ -12,7 +12,11 @@ class AddMissingIndexesForForeignKeysEE < ActiveRecord::Migration[4.2]
add_concurrent_index
(
:application_settings
,
:custom_project_templates_group_id
)
add_concurrent_index
(
:board_assignees
,
:assignee_id
)
add_concurrent_index
(
:board_labels
,
:label_id
)
add_concurrent_index
(
:ci_pipeline_chat_data
,
:chat_name_id
)
# This index has been hoisted up to `20180209115333_create_chatops_tables.rb`
# so that it could be ported to Core without breaking upgrades
add_concurrent_index
(
:ci_pipeline_chat_data
,
:chat_name_id
)
unless
index_exists?
(
:ci_pipeline_chat_data
,
:chat_name_id
)
add_concurrent_index
(
:geo_node_namespace_links
,
:namespace_id
)
add_concurrent_index
(
:namespaces
,
:file_template_project_id
)
add_concurrent_index
(
:protected_branch_merge_access_levels
,
:group_id
)
...
...
@@ -29,7 +33,6 @@ class AddMissingIndexesForForeignKeysEE < ActiveRecord::Migration[4.2]
remove_concurrent_index
(
:application_settings
,
:custom_project_templates_group_id
)
remove_concurrent_index
(
:board_assignees
,
:assignee_id
)
remove_concurrent_index
(
:board_labels
,
:label_id
)
remove_concurrent_index
(
:ci_pipeline_chat_data
,
:chat_name_id
)
remove_concurrent_index
(
:geo_node_namespace_links
,
:namespace_id
)
remove_concurrent_index
(
:namespaces
,
:file_template_project_id
)
remove_concurrent_index
(
:protected_branch_merge_access_levels
,
:group_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