diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-03 00:51:03 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-03 00:51:03 +0300 |
commit | 648826721f13ee4309a11638e538d96006648b39 (patch) | |
tree | 9e2cb1b728208671c4d653d32223a02d19f3fe82 /db/migrate/20180125214301_create_user_callouts.rb | |
parent | 838cc0907c963a025553d639283b3bbf8140dae8 (diff) |
Rename Callout to UserCallout
Diffstat (limited to 'db/migrate/20180125214301_create_user_callouts.rb')
-rw-r--r-- | db/migrate/20180125214301_create_user_callouts.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20180125214301_create_user_callouts.rb b/db/migrate/20180125214301_create_user_callouts.rb new file mode 100644 index 00000000000..945f4181274 --- /dev/null +++ b/db/migrate/20180125214301_create_user_callouts.rb @@ -0,0 +1,16 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class CreateUserCallouts < ActiveRecord::Migration + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + create_table :user_callouts do |t| + t.string :feature_name, null: false + t.references :user, index: true, foreign_key: { on_delete: :cascade }, null: false + end + + add_index :user_callouts, [:user_id, :feature_name], unique: true + end +end |