diff --git a/src/api/app/models/canned_response.rb b/src/api/app/models/canned_response.rb index 5b707b18b3a..4869eafdf80 100644 --- a/src/api/app/models/canned_response.rb +++ b/src/api/app/models/canned_response.rb @@ -50,19 +50,19 @@ class CannedResponse < ApplicationRecord # title :string(255) not null # created_at :datetime not null # updated_at :datetime not null -# project_id :integer indexed # package_id :integer indexed +# project_id :integer indexed # user_id :integer not null, indexed # # Indexes # -# index_canned_responses_on_project_id (project_id) # index_canned_responses_on_package_id (package_id) +# index_canned_responses_on_project_id (project_id) # index_canned_responses_on_user_id (user_id) # # Foreign Keys # -# fk_rails_... (project_id => projects.id) ON DELETE => nullify # fk_rails_... (package_id => packages.id) ON DELETE => nullify +# fk_rails_... (project_id => projects.id) ON DELETE => nullify # fk_rails_... (user_id => users.id) # diff --git a/src/api/app/models/event/global_role_assigned.rb b/src/api/app/models/event/global_role_assigned.rb index f25a27fc017..f6555ed86d1 100644 --- a/src/api/app/models/event/global_role_assigned.rb +++ b/src/api/app/models/event/global_role_assigned.rb @@ -29,3 +29,22 @@ def subject end end end + +# == Schema Information +# +# Table name: events +# +# id :bigint not null, primary key +# eventtype :string(255) not null, indexed +# mails_sent :boolean default(FALSE), indexed +# payload :text(16777215) +# undone_jobs :integer default(0) +# created_at :datetime indexed +# updated_at :datetime +# +# Indexes +# +# index_events_on_created_at (created_at) +# index_events_on_eventtype (eventtype) +# index_events_on_mails_sent (mails_sent) +# diff --git a/src/api/app/models/notification_user.rb b/src/api/app/models/notification_user.rb index 91b003843b2..1710776c525 100644 --- a/src/api/app/models/notification_user.rb +++ b/src/api/app/models/notification_user.rb @@ -22,3 +22,38 @@ def link_path Rails.application.routes.url_helpers.user_path(event_payload['user'], notification_id: id) end end + +# == Schema Information +# +# Table name: notifications +# +# id :bigint not null, primary key +# bs_request_oldstate :string(255) +# bs_request_state :string(255) +# delivered :boolean default(FALSE), indexed +# event_payload :text(16777215) not null +# event_type :string(255) not null, indexed +# last_seen_at :datetime +# notifiable_type :string(255) indexed => [notifiable_id] +# rss :boolean default(FALSE), indexed +# subscriber_type :string(255) indexed => [subscriber_id] +# subscription_receiver_role :string(255) not null +# title :string(255) +# type :string(255) indexed +# web :boolean default(FALSE), indexed +# created_at :datetime not null, indexed +# updated_at :datetime not null +# notifiable_id :integer indexed => [notifiable_type] +# subscriber_id :integer indexed => [subscriber_type] +# +# Indexes +# +# index_notifications_on_created_at (created_at) +# index_notifications_on_delivered (delivered) +# index_notifications_on_event_type (event_type) +# index_notifications_on_notifiable_type_and_notifiable_id (notifiable_type,notifiable_id) +# index_notifications_on_rss (rss) +# index_notifications_on_subscriber_type_and_subscriber_id (subscriber_type,subscriber_id) +# index_notifications_on_type (type) +# index_notifications_on_web (web) +# diff --git a/src/api/db/schema.rb b/src/api/db/schema.rb index 7224bfd917f..a469df1d774 100644 --- a/src/api/db/schema.rb +++ b/src/api/db/schema.rb @@ -300,9 +300,9 @@ t.datetime "updated_at", null: false t.integer "decision_type" t.integer "project_id" - t.index ["project_id"], name: "index_canned_responses_on_project_id" t.integer "package_id" t.index ["package_id"], name: "index_canned_responses_on_package_id" + t.index ["project_id"], name: "index_canned_responses_on_project_id" t.index ["user_id"], name: "index_canned_responses_on_user_id" end @@ -1334,8 +1334,8 @@ add_foreign_key "blocked_users", "users", column: "blocker_id" add_foreign_key "bs_request_action_accept_infos", "bs_request_actions", name: "bs_request_action_accept_infos_ibfk_1" add_foreign_key "bs_request_actions", "bs_requests", name: "bs_request_actions_ibfk_1" - add_foreign_key "canned_responses", "projects", on_delete: :nullify add_foreign_key "canned_responses", "packages", on_delete: :nullify + add_foreign_key "canned_responses", "projects", on_delete: :nullify add_foreign_key "canned_responses", "users" add_foreign_key "channel_binaries", "architectures", name: "channel_binaries_ibfk_4" add_foreign_key "channel_binaries", "channel_binary_lists", name: "channel_binaries_ibfk_1"