diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-07 03:06:16 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-07 03:06:16 +0000 |
commit | eb0d9e20c5a81b0a556308ae3fc8015fcc3c9621 (patch) | |
tree | 1ef7347e275986d8d7621cc21d64f3eec1aa7a3a /db/migrate | |
parent | ee6b185429b62857a5e490526095a7699e8539f3 (diff) | |
download | gitlab-ce-eb0d9e20c5a81b0a556308ae3fc8015fcc3c9621.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20191017001326_create_users_security_dashboard_projects.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20191017001326_create_users_security_dashboard_projects.rb b/db/migrate/20191017001326_create_users_security_dashboard_projects.rb new file mode 100644 index 00000000000..398401dbee6 --- /dev/null +++ b/db/migrate/20191017001326_create_users_security_dashboard_projects.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class CreateUsersSecurityDashboardProjects < ActiveRecord::Migration[5.2] + DOWNTIME = false + INDEX_NAME = 'users_security_dashboard_projects_unique_index' + + def change + create_table :users_security_dashboard_projects, id: false do |t| + t.references :user, null: false, foreign_key: { on_delete: :cascade } + t.references :project, null: false, index: false, foreign_key: { on_delete: :cascade } + end + + add_index :users_security_dashboard_projects, [:project_id, :user_id], name: INDEX_NAME, unique: true + end +end |