diff options
author | Simon Knox <psimyn@gmail.com> | 2017-10-03 08:41:33 +1100 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2017-10-03 08:41:33 +1100 |
commit | d54983885bee00ff7b49c4352639beca4a082f46 (patch) | |
tree | 24c684554dfbfcc1a1fb3aa70b51f1ffdf041a48 /db/migrate/20170720122741_create_user_custom_attributes.rb | |
parent | 06b31461f34bac86d31d898e4f0e5b573d6b0345 (diff) | |
parent | 0781e956e4a4174494aa28b62b8dfc92a92e8e84 (diff) | |
download | gitlab-ce-d54983885bee00ff7b49c4352639beca4a082f46.tar.gz |
Merge remote-tracking branch 'origin' into 37229-mr-widget-status-icon
Diffstat (limited to 'db/migrate/20170720122741_create_user_custom_attributes.rb')
-rw-r--r-- | db/migrate/20170720122741_create_user_custom_attributes.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20170720122741_create_user_custom_attributes.rb b/db/migrate/20170720122741_create_user_custom_attributes.rb new file mode 100644 index 00000000000..b1c0bebc633 --- /dev/null +++ b/db/migrate/20170720122741_create_user_custom_attributes.rb @@ -0,0 +1,17 @@ +class CreateUserCustomAttributes < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + create_table :user_custom_attributes do |t| + t.timestamps_with_timezone null: false + t.references :user, null: false, foreign_key: { on_delete: :cascade } + t.string :key, null: false + t.string :value, null: false + + t.index [:user_id, :key], unique: true + t.index [:key, :value] + end + end +end |