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
66157b0b
Commit
66157b0b
authored
Oct 02, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unneeded cop excludes for Migration/AddConcurrentForeignKey
There are still some valid left.
parent
c2745ad6
Changes
49
Show whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
49 additions
and
51 deletions
+49
-51
db/migrate/20200226100624_requirements_add_project_fk.rb
db/migrate/20200226100624_requirements_add_project_fk.rb
+1
-1
db/migrate/20200226100634_requirements_add_author_fk.rb
db/migrate/20200226100634_requirements_add_author_fk.rb
+1
-1
db/migrate/20200304121828_add_ci_sources_project_pipeline_foreign_key.rb
...0304121828_add_ci_sources_project_pipeline_foreign_key.rb
+1
-1
db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb
...1844_add_ci_sources_project_source_project_foreign_key.rb
+1
-1
db/migrate/20200316173312_add_vulnerability_export_project_foreign_key.rb
...316173312_add_vulnerability_export_project_foreign_key.rb
+1
-1
db/migrate/20200317142110_add_vulnerability_export_user_foreign_key.rb
...200317142110_add_vulnerability_export_user_foreign_key.rb
+1
-1
db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb
...e/20200326124443_add_projects_fk_to_jira_imports_table.rb
+1
-1
db/migrate/20200326134443_add_users_fk_to_jira_imports_table.rb
...rate/20200326134443_add_users_fk_to_jira_imports_table.rb
+1
-1
db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb
...ate/20200326144443_add_labels_fk_to_jira_imports_table.rb
+1
-1
db/migrate/20200416120354_add_locked_by_user_id_foreign_key_to_terraform_state.rb
...4_add_locked_by_user_id_foreign_key_to_terraform_state.rb
+1
-1
db/migrate/20200423075720_add_user_id_foreign_key_to_resource_state_events.rb
...75720_add_user_id_foreign_key_to_resource_state_events.rb
+1
-1
db/migrate/20200423080334_add_issue_id_foreign_key_to_resource_state_events.rb
...0334_add_issue_id_foreign_key_to_resource_state_events.rb
+1
-1
db/migrate/20200423080607_add_merge_request_id_foreign_key_to_resource_state_events.rb
..._merge_request_id_foreign_key_to_resource_state_events.rb
+1
-1
db/migrate/20200429015603_add_fk_to_project_repository_storage_moves.rb
...00429015603_add_fk_to_project_repository_storage_moves.rb
+1
-1
db/migrate/20200510183128_add_foreign_key_from_webauthn_registrations_to_users.rb
...8_add_foreign_key_from_webauthn_registrations_to_users.rb
+1
-1
db/migrate/20200511092505_add_foreign_key_to_epic_id_on_resource_state_events.rb
...05_add_foreign_key_to_epic_id_on_resource_state_events.rb
+1
-1
db/migrate/20200511121549_add_group_wiki_repositories_shard_id_foreign_key.rb
...21549_add_group_wiki_repositories_shard_id_foreign_key.rb
+1
-1
db/migrate/20200511121610_add_group_wiki_repositories_group_id_foreign_key.rb
...21610_add_group_wiki_repositories_group_id_foreign_key.rb
+1
-1
db/migrate/20200511191027_add_author_foreign_key_to_test_reports.rb
.../20200511191027_add_author_foreign_key_to_test_reports.rb
+1
-1
db/migrate/20200511208012_add_pipeline_foreign_key_to_test_reports.rb
...0200511208012_add_pipeline_foreign_key_to_test_reports.rb
+1
-1
db/migrate/20200521225337_add_foreign_key_to_user_id_on_alert_management_alert_assignees.rb
...ign_key_to_user_id_on_alert_management_alert_assignees.rb
+1
-1
db/migrate/20200521225346_add_foreign_key_to_alert_id_on_alert_mangagement_alert_assignees.rb
...n_key_to_alert_id_on_alert_mangagement_alert_assignees.rb
+1
-1
db/migrate/20200526164947_add_foreign_key_to_ops_feature_flags_issues.rb
...0526164947_add_foreign_key_to_ops_feature_flags_issues.rb
+1
-1
db/migrate/20200527135313_add_requirements_build_reference.rb
...igrate/20200527135313_add_requirements_build_reference.rb
+1
-1
db/migrate/20200527152116_add_foreign_key_to_build_id_on_build_report_results.rb
...16_add_foreign_key_to_build_id_on_build_report_results.rb
+1
-1
db/migrate/20200527152657_add_foreign_key_to_project_id_on_build_report_results.rb
..._add_foreign_key_to_project_id_on_build_report_results.rb
+1
-1
db/migrate/20200604174544_add_users_foreign_key_to_board_user_preferences.rb
...174544_add_users_foreign_key_to_board_user_preferences.rb
+1
-1
db/migrate/20200604174558_add_boards_foreign_key_to_board_user_preferences.rb
...74558_add_boards_foreign_key_to_board_user_preferences.rb
+1
-1
db/migrate/20200605003204_add_foreign_key_to_alert_management_alert_user_mentions.rb
...dd_foreign_key_to_alert_management_alert_user_mentions.rb
+1
-1
db/migrate/20200623073431_add_source_merge_request_id_to_resource_state_events.rb
...1_add_source_merge_request_id_to_resource_state_events.rb
+1
-1
db/migrate/20200722132040_add_users_fk_to_resource_iteration_events_table.rb
...132040_add_users_fk_to_resource_iteration_events_table.rb
+1
-1
db/migrate/20200722132540_add_issues_fk_to_resource_iteration_events_table.rb
...32540_add_issues_fk_to_resource_iteration_events_table.rb
+1
-1
db/migrate/20200722133040_add_merge_requests_fk_to_resource_iteration_events_table.rb
...d_merge_requests_fk_to_resource_iteration_events_table.rb
+1
-1
db/migrate/20200722133540_add_iterations_fk_to_resource_iteration_events_table.rb
...0_add_iterations_fk_to_resource_iteration_events_table.rb
+1
-1
db/migrate/20200731201408_add_foreign_key_to_experiment_on_experiment_users.rb
...1408_add_foreign_key_to_experiment_on_experiment_users.rb
+1
-1
db/migrate/20200731201834_add_foreign_key_to_user_on_experiment_users.rb
...0731201834_add_foreign_key_to_user_on_experiment_users.rb
+1
-1
db/migrate/20200805151001_add_foreign_key_to_pipeline_id_on_pipeline_artifact.rb
...01_add_foreign_key_to_pipeline_id_on_pipeline_artifact.rb
+1
-1
db/migrate/20200805151726_add_foreign_key_to_project_id_on_pipeline_artifact.rb
...726_add_foreign_key_to_project_id_on_pipeline_artifact.rb
+1
-1
db/migrate/20200825081035_boards_epic_user_preferences_fk_board.rb
...e/20200825081035_boards_epic_user_preferences_fk_board.rb
+1
-1
db/migrate/20200825081045_boards_epic_user_preferences_fk_user.rb
...te/20200825081045_boards_epic_user_preferences_fk_user.rb
+1
-1
db/migrate/20200825081055_boards_epic_user_preferences_fk_epic.rb
...te/20200825081055_boards_epic_user_preferences_fk_epic.rb
+1
-1
db/migrate/20200827060911_add_merge_request_foreign_key_to_merge_request_reviewers.rb
...d_merge_request_foreign_key_to_merge_request_reviewers.rb
+1
-1
db/migrate/20200827060932_add_user_foreign_key_to_merge_request_reviewers.rb
...060932_add_user_foreign_key_to_merge_request_reviewers.rb
+1
-1
db/migrate/20200828155134_add_foreign_key_on_scan_id_to_security_scans.rb
...828155134_add_foreign_key_on_scan_id_to_security_scans.rb
+1
-1
db/migrate/20200828155205_add_foreign_key_on_scanner_id_to_vulnerability_scanners.rb
...dd_foreign_key_on_scanner_id_to_vulnerability_scanners.rb
+1
-1
db/migrate/20200911121027_add_pages_deployment_project_foreign_key.rb
...0200911121027_add_pages_deployment_project_foreign_key.rb
+1
-1
db/migrate/20200911121048_add_pages_deployment_ci_build_foreign_key.rb
...200911121048_add_pages_deployment_ci_build_foreign_key.rb
+1
-1
db/post_migrate/20200810191256_remove_pipeline_id_from_test_reports.rb
...te/20200810191256_remove_pipeline_id_from_test_reports.rb
+0
-2
doc/development/migration_style_guide.md
doc/development/migration_style_guide.md
+2
-2
No files found.
db/migrate/20200226100624_requirements_add_project_fk.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class RequirementsAddProjectFk < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
(
:requirements
,
:projects
,
column: :project_id
,
on_delete: :cascade
)
# rubocop: disable Migration/AddConcurrentForeignKey
add_foreign_key
(
:requirements
,
:projects
,
column: :project_id
,
on_delete: :cascade
)
end
end
...
...
db/migrate/20200226100634_requirements_add_author_fk.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class RequirementsAddAuthorFk < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
(
:requirements
,
:users
,
column: :author_id
,
on_delete: :nullify
)
# rubocop: disable Migration/AddConcurrentForeignKey
add_foreign_key
(
:requirements
,
:users
,
column: :author_id
,
on_delete: :nullify
)
end
end
...
...
db/migrate/20200304121828_add_ci_sources_project_pipeline_foreign_key.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddCiSourcesProjectPipelineForeignKey < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:ci_sources_projects
,
:ci_pipelines
,
column: :pipeline_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:ci_sources_projects
,
:ci_pipelines
,
column: :pipeline_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddCiSourcesProjectSourceProjectForeignKey < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:ci_sources_projects
,
:projects
,
column: :source_project_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:ci_sources_projects
,
:projects
,
column: :source_project_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200316173312_add_vulnerability_export_project_foreign_key.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddVulnerabilityExportProjectForeignKey < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:vulnerability_exports
,
:projects
,
column: :project_id
,
on_delete: :cascade
,
index:
false
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:vulnerability_exports
,
:projects
,
column: :project_id
,
on_delete: :cascade
,
index:
false
end
end
...
...
db/migrate/20200317142110_add_vulnerability_export_user_foreign_key.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddVulnerabilityExportUserForeignKey < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:vulnerability_exports
,
:users
,
column: :author_id
,
on_delete: :cascade
,
index:
false
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:vulnerability_exports
,
:users
,
column: :author_id
,
on_delete: :cascade
,
index:
false
end
end
...
...
db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddProjectsFkToJiraImportsTable < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:jira_imports
,
:projects
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:jira_imports
,
:projects
,
on_delete: :cascade
end
end
...
...
db/migrate/20200326134443_add_users_fk_to_jira_imports_table.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddUsersFkToJiraImportsTable < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:jira_imports
,
:users
,
on_delete: :nullify
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:jira_imports
,
:users
,
on_delete: :nullify
end
end
...
...
db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddLabelsFkToJiraImportsTable < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:jira_imports
,
:labels
,
on_delete: :nullify
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:jira_imports
,
:labels
,
on_delete: :nullify
end
end
...
...
db/migrate/20200416120354_add_locked_by_user_id_foreign_key_to_terraform_state.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddLockedByUserIdForeignKeyToTerraformState < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:terraform_states
,
:users
,
column: :locked_by_user_id
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:terraform_states
,
:users
,
column: :locked_by_user_id
end
end
...
...
db/migrate/20200423075720_add_user_id_foreign_key_to_resource_state_events.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddUserIdForeignKeyToResourceStateEvents < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:resource_state_events
,
:users
,
column: :user_id
,
on_delete: :nullify
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:resource_state_events
,
:users
,
column: :user_id
,
on_delete: :nullify
end
end
...
...
db/migrate/20200423080334_add_issue_id_foreign_key_to_resource_state_events.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddIssueIdForeignKeyToResourceStateEvents < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:resource_state_events
,
:issues
,
column: :issue_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:resource_state_events
,
:issues
,
column: :issue_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200423080607_add_merge_request_id_foreign_key_to_resource_state_events.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddMergeRequestIdForeignKeyToResourceStateEvents < ActiveRecord::Migration
def
up
with_lock_retries
do
add_foreign_key
:resource_state_events
,
:merge_requests
,
column: :merge_request_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:resource_state_events
,
:merge_requests
,
column: :merge_request_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200429015603_add_fk_to_project_repository_storage_moves.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddFkToProjectRepositoryStorageMoves < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:project_repository_storage_moves
,
:projects
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:project_repository_storage_moves
,
:projects
,
on_delete: :cascade
end
end
...
...
db/migrate/20200510183128_add_foreign_key_from_webauthn_registrations_to_users.rb
View file @
66157b0b
...
...
@@ -9,7 +9,7 @@ class AddForeignKeyFromWebauthnRegistrationsToUsers < ActiveRecord::Migration[6.
def
up
with_lock_retries
do
add_foreign_key
:webauthn_registrations
,
:users
,
column: :user_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:webauthn_registrations
,
:users
,
column: :user_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200511092505_add_foreign_key_to_epic_id_on_resource_state_events.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyToEpicIdOnResourceStateEvents < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:resource_state_events
,
:epics
,
column: :epic_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:resource_state_events
,
:epics
,
column: :epic_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200511121549_add_group_wiki_repositories_shard_id_foreign_key.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddGroupWikiRepositoriesShardIdForeignKey < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:group_wiki_repositories
,
:shards
,
on_delete: :restrict
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:group_wiki_repositories
,
:shards
,
on_delete: :restrict
end
end
...
...
db/migrate/20200511121610_add_group_wiki_repositories_group_id_foreign_key.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddGroupWikiRepositoriesGroupIdForeignKey < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:group_wiki_repositories
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:group_wiki_repositories
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200511191027_add_author_foreign_key_to_test_reports.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddAuthorForeignKeyToTestReports < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:requirements_management_test_reports
,
:users
,
column: :author_id
,
on_delete: :nullify
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:requirements_management_test_reports
,
:users
,
column: :author_id
,
on_delete: :nullify
end
end
...
...
db/migrate/20200511208012_add_pipeline_foreign_key_to_test_reports.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddPipelineForeignKeyToTestReports < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:requirements_management_test_reports
,
:ci_pipelines
,
column: :pipeline_id
,
on_delete: :nullify
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:requirements_management_test_reports
,
:ci_pipelines
,
column: :pipeline_id
,
on_delete: :nullify
end
end
...
...
db/migrate/20200521225337_add_foreign_key_to_user_id_on_alert_management_alert_assignees.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyToUserIdOnAlertManagementAlertAssignees < ActiveRecord::Migra
def
up
with_lock_retries
do
add_foreign_key
:alert_management_alert_assignees
,
:users
,
column: :user_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:alert_management_alert_assignees
,
:users
,
column: :user_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200521225346_add_foreign_key_to_alert_id_on_alert_mangagement_alert_assignees.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyToAlertIdOnAlertMangagementAlertAssignees < ActiveRecord::Mig
def
up
with_lock_retries
do
add_foreign_key
:alert_management_alert_assignees
,
:alert_management_alerts
,
column: :alert_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:alert_management_alert_assignees
,
:alert_management_alerts
,
column: :alert_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200526164947_add_foreign_key_to_ops_feature_flags_issues.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyToOpsFeatureFlagsIssues < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:operations_feature_flags_issues
,
:issues
,
column: :issue_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:operations_feature_flags_issues
,
:issues
,
column: :issue_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200527135313_add_requirements_build_reference.rb
View file @
66157b0b
...
...
@@ -11,7 +11,7 @@ class AddRequirementsBuildReference < ActiveRecord::Migration[6.0]
add_index
:requirements_management_test_reports
,
:build_id
,
name:
INDEX_NAME
# rubocop:disable Migration/AddIndex
with_lock_retries
do
add_foreign_key
:requirements_management_test_reports
,
:ci_builds
,
column: :build_id
,
on_delete: :nullify
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:requirements_management_test_reports
,
:ci_builds
,
column: :build_id
,
on_delete: :nullify
end
end
...
...
db/migrate/20200527152116_add_foreign_key_to_build_id_on_build_report_results.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyToBuildIdOnBuildReportResults < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:ci_build_report_results
,
:ci_builds
,
column: :build_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:ci_build_report_results
,
:ci_builds
,
column: :build_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200527152657_add_foreign_key_to_project_id_on_build_report_results.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyToProjectIdOnBuildReportResults < ActiveRecord::Migration[6.0
def
up
with_lock_retries
do
add_foreign_key
:ci_build_report_results
,
:projects
,
column: :project_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:ci_build_report_results
,
:projects
,
column: :project_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200604174544_add_users_foreign_key_to_board_user_preferences.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddUsersForeignKeyToBoardUserPreferences < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:board_user_preferences
,
:users
,
column: :user_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:board_user_preferences
,
:users
,
column: :user_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200604174558_add_boards_foreign_key_to_board_user_preferences.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddBoardsForeignKeyToBoardUserPreferences < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:board_user_preferences
,
:boards
,
column: :board_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:board_user_preferences
,
:boards
,
column: :board_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200605003204_add_foreign_key_to_alert_management_alert_user_mentions.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyToAlertManagementAlertUserMentions < ActiveRecord::Migration[
def
up
with_lock_retries
do
add_foreign_key
:alert_management_alert_user_mentions
,
:notes
,
column: :note_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:alert_management_alert_user_mentions
,
:notes
,
column: :note_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200623073431_add_source_merge_request_id_to_resource_state_events.rb
View file @
66157b0b
...
...
@@ -20,7 +20,7 @@ class AddSourceMergeRequestIdToResourceStateEvents < ActiveRecord::Migration[6.0
unless
foreign_key_exists?
(
:resource_state_events
,
:merge_requests
,
column: :source_merge_request_id
)
with_lock_retries
do
add_foreign_key
:resource_state_events
,
:merge_requests
,
column: :source_merge_request_id
,
on_delete: :nullify
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:resource_state_events
,
:merge_requests
,
column: :source_merge_request_id
,
on_delete: :nullify
end
end
end
...
...
db/migrate/20200722132040_add_users_fk_to_resource_iteration_events_table.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddUsersFkToResourceIterationEventsTable < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:resource_iteration_events
,
:users
,
column: :user_id
,
on_delete: :nullify
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:resource_iteration_events
,
:users
,
column: :user_id
,
on_delete: :nullify
end
end
...
...
db/migrate/20200722132540_add_issues_fk_to_resource_iteration_events_table.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddIssuesFkToResourceIterationEventsTable < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:resource_iteration_events
,
:issues
,
column: :issue_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:resource_iteration_events
,
:issues
,
column: :issue_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200722133040_add_merge_requests_fk_to_resource_iteration_events_table.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddMergeRequestsFkToResourceIterationEventsTable < ActiveRecord::Migration
def
up
with_lock_retries
do
add_foreign_key
:resource_iteration_events
,
:merge_requests
,
column: :merge_request_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:resource_iteration_events
,
:merge_requests
,
column: :merge_request_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200722133540_add_iterations_fk_to_resource_iteration_events_table.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddIterationsFkToResourceIterationEventsTable < ActiveRecord::Migration[6.
def
up
with_lock_retries
do
add_foreign_key
:resource_iteration_events
,
:sprints
,
column: :iteration_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:resource_iteration_events
,
:sprints
,
column: :iteration_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200731201408_add_foreign_key_to_experiment_on_experiment_users.rb
View file @
66157b0b
...
...
@@ -8,7 +8,7 @@ class AddForeignKeyToExperimentOnExperimentUsers < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
# There is no need to use add_concurrent_foreign_key since it's an empty table
add_foreign_key
:experiment_users
,
:experiments
,
column: :experiment_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:experiment_users
,
:experiments
,
column: :experiment_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200731201834_add_foreign_key_to_user_on_experiment_users.rb
View file @
66157b0b
...
...
@@ -8,7 +8,7 @@ class AddForeignKeyToUserOnExperimentUsers < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
# There is no need to use add_concurrent_foreign_key since it's an empty table
add_foreign_key
:experiment_users
,
:users
,
column: :user_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:experiment_users
,
:users
,
column: :user_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200805151001_add_foreign_key_to_pipeline_id_on_pipeline_artifact.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyToPipelineIdOnPipelineArtifact < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:ci_pipeline_artifacts
,
:ci_pipelines
,
column: :pipeline_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:ci_pipeline_artifacts
,
:ci_pipelines
,
column: :pipeline_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200805151726_add_foreign_key_to_project_id_on_pipeline_artifact.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyToProjectIdOnPipelineArtifact < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:ci_pipeline_artifacts
,
:projects
,
column: :project_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:ci_pipeline_artifacts
,
:projects
,
column: :project_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200825081035_boards_epic_user_preferences_fk_board.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class BoardsEpicUserPreferencesFkBoard < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:boards_epic_user_preferences
,
:boards
,
column: :board_id
,
on_delete: :cascade
# rubocop: disable Migration/AddConcurrentForeignKey
add_foreign_key
:boards_epic_user_preferences
,
:boards
,
column: :board_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200825081045_boards_epic_user_preferences_fk_user.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class BoardsEpicUserPreferencesFkUser < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:boards_epic_user_preferences
,
:users
,
column: :user_id
,
on_delete: :cascade
# rubocop: disable Migration/AddConcurrentForeignKey
add_foreign_key
:boards_epic_user_preferences
,
:users
,
column: :user_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200825081055_boards_epic_user_preferences_fk_epic.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class BoardsEpicUserPreferencesFkEpic < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:boards_epic_user_preferences
,
:epics
,
column: :epic_id
,
on_delete: :cascade
# rubocop: disable Migration/AddConcurrentForeignKey
add_foreign_key
:boards_epic_user_preferences
,
:epics
,
column: :epic_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200827060911_add_merge_request_foreign_key_to_merge_request_reviewers.rb
View file @
66157b0b
...
...
@@ -10,7 +10,7 @@ class AddMergeRequestForeignKeyToMergeRequestReviewers < ActiveRecord::Migration
def
up
with_lock_retries
do
add_foreign_key
:merge_request_reviewers
,
:merge_requests
,
column: :merge_request_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:merge_request_reviewers
,
:merge_requests
,
column: :merge_request_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200827060932_add_user_foreign_key_to_merge_request_reviewers.rb
View file @
66157b0b
...
...
@@ -10,7 +10,7 @@ class AddUserForeignKeyToMergeRequestReviewers < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:merge_request_reviewers
,
:users
,
column: :user_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:merge_request_reviewers
,
:users
,
column: :user_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200828155134_add_foreign_key_on_scan_id_to_security_scans.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyOnScanIdToSecurityScans < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:security_findings
,
:security_scans
,
column: :scan_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:security_findings
,
:security_scans
,
column: :scan_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200828155205_add_foreign_key_on_scanner_id_to_vulnerability_scanners.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddForeignKeyOnScannerIdToVulnerabilityScanners < ActiveRecord::Migration[
def
up
with_lock_retries
do
add_foreign_key
:security_findings
,
:vulnerability_scanners
,
column: :scanner_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:security_findings
,
:vulnerability_scanners
,
column: :scanner_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200911121027_add_pages_deployment_project_foreign_key.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddPagesDeploymentProjectForeignKey < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:pages_deployments
,
:projects
,
column: :project_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:pages_deployments
,
:projects
,
column: :project_id
,
on_delete: :cascade
end
end
...
...
db/migrate/20200911121048_add_pages_deployment_ci_build_foreign_key.rb
View file @
66157b0b
...
...
@@ -7,7 +7,7 @@ class AddPagesDeploymentCiBuildForeignKey < ActiveRecord::Migration[6.0]
def
up
with_lock_retries
do
add_foreign_key
:pages_deployments
,
:ci_builds
,
column: :ci_build_id
,
on_delete: :nullify
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:pages_deployments
,
:ci_builds
,
column: :ci_build_id
,
on_delete: :nullify
end
end
...
...
db/post_migrate/20200810191256_remove_pipeline_id_from_test_reports.rb
View file @
66157b0b
...
...
@@ -13,9 +13,7 @@ class RemovePipelineIdFromTestReports < ActiveRecord::Migration[6.0]
add_column
:requirements_management_test_reports
,
:pipeline_id
,
:integer
with_lock_retries
do
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:requirements_management_test_reports
,
:ci_pipelines
,
column: :pipeline_id
,
on_delete: :nullify
# rubocop:enable Migration/AddConcurrentForeignKey
end
end
end
doc/development/migration_style_guide.md
View file @
66157b0b
...
...
@@ -300,7 +300,7 @@ include Gitlab::Database::MigrationHelpers
def
up
with_lock_retries
do
add_foreign_key
:imports
,
:projects
,
column: :project_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:imports
,
:projects
,
column: :project_id
,
on_delete: :cascade
end
end
...
...
@@ -318,7 +318,7 @@ include Gitlab::Database::MigrationHelpers
def
up
with_lock_retries
do
add_foreign_key
:imports
,
:users
,
column: :user_id
,
on_delete: :cascade
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:imports
,
:users
,
column: :user_id
,
on_delete: :cascade
end
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