summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-02-02 22:51:03 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-02-02 22:51:03 +0100
commit648826721f13ee4309a11638e538d96006648b39 (patch)
tree9e2cb1b728208671c4d653d32223a02d19f3fe82 /db
parent838cc0907c963a025553d639283b3bbf8140dae8 (diff)
downloadgitlab-ce-648826721f13ee4309a11638e538d96006648b39.tar.gz
Rename Callout to UserCallout
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180125214301_create_user_callouts.rb (renamed from db/migrate/20180125214301_create_callouts.rb)6
-rw-r--r--db/schema.rb20
2 files changed, 12 insertions, 14 deletions
diff --git a/db/migrate/20180125214301_create_callouts.rb b/db/migrate/20180125214301_create_user_callouts.rb
index bce3d808efd..945f4181274 100644
--- a/db/migrate/20180125214301_create_callouts.rb
+++ b/db/migrate/20180125214301_create_user_callouts.rb
@@ -1,16 +1,16 @@
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
-class CreateCallouts < ActiveRecord::Migration
+class CreateUserCallouts < ActiveRecord::Migration
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
def change
- create_table :callouts do |t|
+ 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 :callouts, [:user_id, :feature_name], unique: true
+ add_index :user_callouts, [:user_id, :feature_name], unique: true
end
end
diff --git a/db/schema.rb b/db/schema.rb
index 1b837db4e8d..46e4b6d2188 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -203,16 +203,6 @@ ActiveRecord::Schema.define(version: 20180125214301) do
add_index "broadcast_messages", ["starts_at", "ends_at", "id"], name: "index_broadcast_messages_on_starts_at_and_ends_at_and_id", using: :btree
- create_table "callouts", force: :cascade do |t|
- t.string "feature_name", 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", ["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|
t.integer "user_id", null: false
t.integer "service_id", null: false
@@ -1779,6 +1769,14 @@ ActiveRecord::Schema.define(version: 20180125214301) do
add_index "user_agent_details", ["subject_id", "subject_type"], name: "index_user_agent_details_on_subject_id_and_subject_type", using: :btree
+ create_table "user_callouts", force: :cascade do |t|
+ t.string "feature_name", null: false
+ t.integer "user_id", null: false
+ end
+
+ add_index "user_callouts", ["user_id", "feature_name"], name: "index_user_callouts_on_user_id_and_feature_name", unique: true, using: :btree
+ add_index "user_callouts", ["user_id"], name: "index_user_callouts_on_user_id", using: :btree
+
create_table "user_custom_attributes", force: :cascade do |t|
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
@@ -1934,7 +1932,6 @@ ActiveRecord::Schema.define(version: 20180125214301) do
add_index "web_hooks", ["type"], name: "index_web_hooks_on_type", using: :btree
add_foreign_key "boards", "projects", name: "fk_f15266b5f9", on_delete: :cascade
- add_foreign_key "callouts", "users", on_delete: :cascade
add_foreign_key "chat_teams", "namespaces", on_delete: :cascade
add_foreign_key "ci_build_trace_section_names", "projects", on_delete: :cascade
add_foreign_key "ci_build_trace_sections", "ci_build_trace_section_names", column: "section_name_id", name: "fk_264e112c66", on_delete: :cascade
@@ -2051,6 +2048,7 @@ ActiveRecord::Schema.define(version: 20180125214301) do
add_foreign_key "todos", "projects", name: "fk_45054f9c45", on_delete: :cascade
add_foreign_key "trending_projects", "projects", on_delete: :cascade
add_foreign_key "u2f_registrations", "users"
+ add_foreign_key "user_callouts", "users", on_delete: :cascade
add_foreign_key "user_custom_attributes", "users", on_delete: :cascade
add_foreign_key "user_synced_attributes_metadata", "users", on_delete: :cascade
add_foreign_key "users_star_projects", "projects", name: "fk_22cd27ddfc", on_delete: :cascade