diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-02 03:07:33 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-02 03:07:33 +0100 |
commit | ad38e120069748049786373af1c2286cf9c849eb (patch) | |
tree | 6d181590029de741e73a6527dcd82a214d9f41c4 /db | |
parent | 4ff0cfe541739ead870fc9f7708db9b19e5b718c (diff) | |
download | gitlab-ce-ad38e120069748049786373af1c2286cf9c849eb.tar.gz |
Remove dismissed_state from Callout model
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180125214301_create_callouts.rb | 3 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/db/migrate/20180125214301_create_callouts.rb b/db/migrate/20180125214301_create_callouts.rb index 5dc9638a845..b6749b4cfe6 100644 --- a/db/migrate/20180125214301_create_callouts.rb +++ b/db/migrate/20180125214301_create_callouts.rb @@ -8,12 +8,11 @@ class CreateCallouts < ActiveRecord::Migration def change create_table :callouts do |t| t.string :feature_name, null: false - t.boolean :dismissed_state, null: false t.references :user, index: true, foreign_key: { on_delete: :cascade }, null: false t.timestamps_with_timezone null: false end - add_index :callouts, :feature_name, unique: true + add_index :callouts, [:user_id, :feature_name], unique: true end end diff --git a/db/schema.rb b/db/schema.rb index fc12e5752b3..1b837db4e8d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -205,13 +205,12 @@ ActiveRecord::Schema.define(version: 20180125214301) do create_table "callouts", force: :cascade do |t| t.string "feature_name", null: false - t.boolean "dismissed_state", null: false t.integer "user_id", null: false t.datetime_with_timezone "created_at", null: false t.datetime_with_timezone "updated_at", null: false end - add_index "callouts", ["feature_name"], name: "index_callouts_on_feature_name", unique: true, using: :btree + add_index "callouts", ["user_id", "feature_name"], name: "index_callouts_on_user_id_and_feature_name", unique: true, using: :btree add_index "callouts", ["user_id"], name: "index_callouts_on_user_id", using: :btree create_table "chat_names", force: :cascade do |t| |