diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-03-17 16:45:04 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-03-17 16:45:04 +0000 |
commit | 9162e34bb078be9f4fb35b7e43f89c926dc3bcd8 (patch) | |
tree | 7d93fd0f30f83fb2fb2e502a4891aa2f1571fbc7 /db/migrate | |
parent | 409097bd7e0f5857cf0bc5462bd47484980ec787 (diff) | |
parent | 22fcb2f418ed6a2c7e68c0cd3ec2d414510ad4ec (diff) | |
download | gitlab-ce-9162e34bb078be9f4fb35b7e43f89c926dc3bcd8.tar.gz |
Merge branch 'issue_subscription' into 'master'
Subscription to issue/mr
Fixes #1911 and #1909
![joxi_screenshot_1426601822159](https://dev.gitlab.org/gitlab/gitlabhq/uploads/53021bc5783271322ab2dfba7598eaa3/joxi_screenshot_1426601822159.png)
![joxi_screenshot_1426601836423](https://dev.gitlab.org/gitlab/gitlabhq/uploads/244ff360fbd6f30980f8dad699400814/joxi_screenshot_1426601836423.png)
See merge request !1702
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20150313012111_create_subscriptions_table.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20150313012111_create_subscriptions_table.rb b/db/migrate/20150313012111_create_subscriptions_table.rb new file mode 100644 index 00000000000..a1d4d9dedc5 --- /dev/null +++ b/db/migrate/20150313012111_create_subscriptions_table.rb @@ -0,0 +1,16 @@ +class CreateSubscriptionsTable < ActiveRecord::Migration + def change + create_table :subscriptions do |t| + t.integer :user_id + t.references :subscribable, polymorphic: true + t.boolean :subscribed + + t.timestamps + end + + add_index :subscriptions, + [:subscribable_id, :subscribable_type, :user_id], + unique: true, + name: 'subscriptions_user_id_and_ref_fields' + end +end |