Skip to content

Commit

Permalink
chore: Sync the schema and migrations (#1610)
Browse files Browse the repository at this point in the history
  • Loading branch information
sojan-official committed Jan 6, 2021
1 parent 627d3a5 commit db189e3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/models/conversation.rb
Expand Up @@ -7,12 +7,12 @@
# agent_last_seen_at :datetime
# contact_last_seen_at :datetime
# identifier :string
# last_activity_at :datetime
# last_activity_at :datetime not null
# locked :boolean default(FALSE)
# status :integer default("open"), not null
# uuid :uuid not null
# created_at :datetime
# updated_at :datetime
# created_at :datetime not null
# updated_at :datetime not null
# account_id :integer not null
# assignee_id :integer
# contact_id :bigint
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20210105185632_enable_pg_stats_extention.rb
@@ -0,0 +1,5 @@
class EnablePgStatsExtention < ActiveRecord::Migration[6.0]
def change
enable_extension 'pg_stat_statements'
end
end
10 changes: 6 additions & 4 deletions db/schema.rb
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2020_11_25_123131) do
ActiveRecord::Schema.define(version: 2021_01_05_185632) do

# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
Expand Down Expand Up @@ -219,8 +219,8 @@
t.integer "inbox_id", null: false
t.integer "status", default: 0, null: false
t.integer "assignee_id"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.bigint "contact_id"
t.integer "display_id", null: false
t.datetime "contact_last_seen_at"
Expand All @@ -230,7 +230,7 @@
t.bigint "contact_inbox_id"
t.uuid "uuid", default: -> { "gen_random_uuid()" }, null: false
t.string "identifier"
t.datetime "last_activity_at", default: -> { "CURRENT_TIMESTAMP" }
t.datetime "last_activity_at", default: -> { "CURRENT_TIMESTAMP" }, null: false
t.index ["account_id", "display_id"], name: "index_conversations_on_account_id_and_display_id", unique: true
t.index ["account_id"], name: "index_conversations_on_account_id"
t.index ["contact_inbox_id"], name: "index_conversations_on_contact_inbox_id"
Expand Down Expand Up @@ -456,9 +456,11 @@
t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy"
t.index ["taggable_id"], name: "index_taggings_on_taggable_id"
t.index ["taggable_type", "taggable_id"], name: "index_taggings_on_taggable_type_and_taggable_id"
t.index ["taggable_type"], name: "index_taggings_on_taggable_type"
t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type"
t.index ["tagger_id"], name: "index_taggings_on_tagger_id"
t.index ["tagger_type", "tagger_id"], name: "index_taggings_on_tagger_type_and_tagger_id"
end

create_table "tags", id: :serial, force: :cascade do |t|
Expand Down

0 comments on commit db189e3

Please sign in to comment.