group unread count

This commit is contained in:
2458773093
2019-07-20 01:06:32 +03:00
parent 04b219355c
commit a6f09dc0c7
5 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
class AddUnreadCountToGroupAccounts < ActiveRecord::Migration[5.2]
def change
add_column :group_accounts, :unread_count, :integer, default: 0
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_07_16_173227) do
ActiveRecord::Schema.define(version: 2019_07_21_214831) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -327,6 +327,7 @@ ActiveRecord::Schema.define(version: 2019_07_16_173227) do
t.string "role"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "unread_count", default: 0
t.index ["account_id", "group_id"], name: "index_group_accounts_on_account_id_and_group_id", unique: true
t.index ["account_id"], name: "index_group_accounts_on_account_id"
t.index ["group_id", "account_id"], name: "index_group_accounts_on_group_id_and_account_id"