Updates to groups sorting

• Updates to groups sorting
This commit is contained in:
mgabdev
2020-08-08 13:08:48 -05:00
parent d3aa5ddf4b
commit 4a8cd0b585
8 changed files with 47 additions and 6 deletions

View File

@@ -0,0 +1,8 @@
class AddIndexToStatusCreatedAt < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def change
add_index :statuses, :created_at, algorithm: :concurrently
add_index :statuses, :updated_at, algorithm: :concurrently
end
end

View File

@@ -0,0 +1,7 @@
class AddIndexToUserCurrentSignInAt < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def change
add_index :users, :current_sign_in_at, algorithm: :concurrently
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: 2020_08_06_231714) do
ActiveRecord::Schema.define(version: 2020_08_08_170708) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
@@ -775,12 +775,14 @@ ActiveRecord::Schema.define(version: 2020_08_06_231714) do
t.datetime "expires_at"
t.boolean "has_quote"
t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20180106", order: { id: :desc }
t.index ["created_at"], name: "index_statuses_on_created_at"
t.index ["group_id"], name: "index_statuses_on_group_id"
t.index ["in_reply_to_account_id"], name: "index_statuses_on_in_reply_to_account_id"
t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id"
t.index ["quote_of_id"], name: "index_statuses_on_quote_of_id"
t.index ["reblog_of_id", "account_id"], name: "index_statuses_on_reblog_of_id_and_account_id"
t.index ["reply"], name: "index_statuses_on_reply"
t.index ["updated_at"], name: "index_statuses_on_updated_at"
t.index ["uri"], name: "index_statuses_on_uri", unique: true
end
@@ -893,6 +895,7 @@ ActiveRecord::Schema.define(version: 2020_08_06_231714) do
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
t.index ["created_at"], name: "index_users_on_created_at"
t.index ["created_by_application_id"], name: "index_users_on_created_by_application_id"
t.index ["current_sign_in_at"], name: "index_users_on_current_sign_in_at"
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
t.index ["unique_email"], name: "index_users_on_unique_email"