Chore: clean up Reporting Events (#4044)

Tech debt clean up

Fixes #4057

Co-authored-by: Aswin Dev P S <aswin@chatwoot.com>
This commit is contained in:
Sojan Jose
2022-02-28 18:16:12 +05:30
committed by GitHub
parent 12c0be002e
commit 4260441f8c
21 changed files with 54 additions and 186 deletions

View File

@@ -0,0 +1,5 @@
class RenameEventsToReportEvents < ActiveRecord::Migration[6.0]
def change
rename_table :events, :reporting_events
end
end

View File

@@ -434,22 +434,6 @@ ActiveRecord::Schema.define(version: 2022_02_18_120357) do
t.index ["name", "account_id"], name: "index_email_templates_on_name_and_account_id", unique: true
end
create_table "events", force: :cascade do |t|
t.string "name"
t.float "value"
t.integer "account_id"
t.integer "inbox_id"
t.integer "user_id"
t.integer "conversation_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["account_id"], name: "index_events_on_account_id"
t.index ["created_at"], name: "index_events_on_created_at"
t.index ["inbox_id"], name: "index_events_on_inbox_id"
t.index ["name"], name: "index_events_on_name"
t.index ["user_id"], name: "index_events_on_user_id"
end
create_table "inbox_members", id: :serial, force: :cascade do |t|
t.integer "user_id", null: false
t.integer "inbox_id", null: false
@@ -664,6 +648,22 @@ ActiveRecord::Schema.define(version: 2022_02_18_120357) do
t.datetime "updated_at", precision: 6, null: false
end
create_table "reporting_events", force: :cascade do |t|
t.string "name"
t.float "value"
t.integer "account_id"
t.integer "inbox_id"
t.integer "user_id"
t.integer "conversation_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["account_id"], name: "index_reporting_events_on_account_id"
t.index ["created_at"], name: "index_reporting_events_on_created_at"
t.index ["inbox_id"], name: "index_reporting_events_on_inbox_id"
t.index ["name"], name: "index_reporting_events_on_name"
t.index ["user_id"], name: "index_reporting_events_on_user_id"
end
create_table "taggings", id: :serial, force: :cascade do |t|
t.integer "tag_id"
t.string "taggable_type"