diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 18:06:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 18:06:03 +0000 |
commit | 40d3d574132d2849646c20eb9d8742b159d9bfc8 (patch) | |
tree | 431dee6675639da4421dbb1d6f50b7734a3190c3 /db | |
parent | 5939b09fd3db37ec98dfce0345162617d9d1d313 (diff) | |
download | gitlab-ce-40d3d574132d2849646c20eb9d8742b159d9bfc8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
4 files changed, 8 insertions, 2 deletions
diff --git a/db/migrate/20190611161641_add_target_project_id_to_merge_trains.rb b/db/migrate/20190611161641_add_target_project_id_to_merge_trains.rb index c200208e4c3..553e9371ab3 100644 --- a/db/migrate/20190611161641_add_target_project_id_to_merge_trains.rb +++ b/db/migrate/20190611161641_add_target_project_id_to_merge_trains.rb @@ -6,9 +6,9 @@ class AddTargetProjectIdToMergeTrains < ActiveRecord::Migration[5.1] DOWNTIME = false def change - # rubocop: disable Rails/NotNullColumn + # rubocop:disable Rails/NotNullColumn, Migration/AddReference add_reference :merge_trains, :target_project, null: false, index: true, foreign_key: { on_delete: :cascade, to_table: :projects }, type: :integer add_column :merge_trains, :target_branch, :text, null: false - # rubocop: enable Rails/NotNullColumn + # rubocop:enable Rails/NotNullColumn, Migration/AddReference end end diff --git a/db/migrate/20190712040400_add_environment_id_to_clusters_kubernetes_namespaces.rb b/db/migrate/20190712040400_add_environment_id_to_clusters_kubernetes_namespaces.rb index 5ab5a9ba2f8..7f465c0a962 100644 --- a/db/migrate/20190712040400_add_environment_id_to_clusters_kubernetes_namespaces.rb +++ b/db/migrate/20190712040400_add_environment_id_to_clusters_kubernetes_namespaces.rb @@ -4,7 +4,9 @@ class AddEnvironmentIdToClustersKubernetesNamespaces < ActiveRecord::Migration[5 DOWNTIME = false def change + # rubocop:disable Migration/AddReference add_reference :clusters_kubernetes_namespaces, :environment, index: true, type: :bigint, foreign_key: { on_delete: :nullify } + # rubocop:enable Migration/AddReference end end diff --git a/db/migrate/20190715042813_add_issue_id_to_versions.rb b/db/migrate/20190715042813_add_issue_id_to_versions.rb index 1cefdbc9df2..623e72c1096 100644 --- a/db/migrate/20190715042813_add_issue_id_to_versions.rb +++ b/db/migrate/20190715042813_add_issue_id_to_versions.rb @@ -4,7 +4,9 @@ class AddIssueIdToVersions < ActiveRecord::Migration[5.2] DOWNTIME = false def up + # rubocop:disable Migration/AddReference add_reference :design_management_versions, :issue, index: true, foreign_key: { on_delete: :cascade } + # rubocop:enable Migration/AddReference end def down diff --git a/db/migrate/20190724112147_add_column_for_self_monitoring_project_id.rb b/db/migrate/20190724112147_add_column_for_self_monitoring_project_id.rb index ce249a527e6..cf44804cdb4 100644 --- a/db/migrate/20190724112147_add_column_for_self_monitoring_project_id.rb +++ b/db/migrate/20190724112147_add_column_for_self_monitoring_project_id.rb @@ -4,11 +4,13 @@ class AddColumnForSelfMonitoringProjectId < ActiveRecord::Migration[5.2] DOWNTIME = false def change + # rubocop:disable Migration/AddReference add_reference( :application_settings, :instance_administration_project, index: { name: 'index_applicationsettings_on_instance_administration_project_id' }, foreign_key: { to_table: :projects, on_delete: :nullify } ) + # rubocop:enable Migration/AddReference end end |