Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-02 16:03:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-02 16:03:23 +0300
commita72a9af092c1bfcf9f8024d59c11cf222f07e1e7 (patch)
tree44b60265c1d476d026b2862d2c1244748f558d4f /db/migrate/20191210211253_create_resource_weight_event.rb
parentb085478c4c2bed74fdc6eb2c33bfc62e791baf03 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20191210211253_create_resource_weight_event.rb')
-rw-r--r--db/migrate/20191210211253_create_resource_weight_event.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20191210211253_create_resource_weight_event.rb b/db/migrate/20191210211253_create_resource_weight_event.rb
new file mode 100644
index 00000000000..b458c5f169f
--- /dev/null
+++ b/db/migrate/20191210211253_create_resource_weight_event.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class CreateResourceWeightEvent < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def change
+ create_table :resource_weight_events do |t|
+ t.references :user, null: false, foreign_key: { on_delete: :nullify },
+ index: { name: 'index_resource_weight_events_on_user_id' }
+ t.references :issue, null: false, foreign_key: { on_delete: :cascade },
+ index: false
+ t.integer :weight
+ t.datetime_with_timezone :created_at, null: false
+
+ t.index [:issue_id, :weight], name: 'index_resource_weight_events_on_issue_id_and_weight'
+ end
+ end
+end