Merge branch 'kb_development' into kb_migration

This commit is contained in:
KMY 2023-03-17 09:31:21 +09:00
commit d6008cffb5
19 changed files with 161 additions and 23 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddGroupMessageFollowingOnlyToAccounts < ActiveRecord::Migration[6.1]
def change
add_column :accounts, :group_message_following_only, :boolean

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddGroupAllowPrivateMessageToAccounts < ActiveRecord::Migration[6.1]
def change
add_column :accounts, :group_allow_private_message, :boolean

View file

@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddGroupActivityPubCountToAccountStats < ActiveRecord::Migration[6.1]
def change
add_column :account_stats, :group_activitypub_count, :integer
end
end

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
class RemoveGroupMessageFollowingOnlyFromAccounts < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
safety_assured { remove_column :accounts, :group_message_following_only, :boolean }
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: 2023_03_14_081013) do
ActiveRecord::Schema.define(version: 2023_03_14_121142) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -99,6 +99,7 @@ ActiveRecord::Schema.define(version: 2023_03_14_081013) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "last_status_at"
t.integer "group_activitypub_count"
t.index ["account_id"], name: "index_account_stats_on_account_id", unique: true
end
@ -186,7 +187,6 @@ ActiveRecord::Schema.define(version: 2023_03_14_081013) do
t.boolean "trendable"
t.datetime "reviewed_at"
t.datetime "requested_review_at"
t.boolean "group_message_following_only"
t.boolean "group_allow_private_message"
t.index "(((setweight(to_tsvector('simple'::regconfig, (display_name)::text), 'A'::\"char\") || setweight(to_tsvector('simple'::regconfig, (username)::text), 'B'::\"char\")) || setweight(to_tsvector('simple'::regconfig, (COALESCE(domain, ''::character varying))::text), 'C'::\"char\")))", name: "search_index", using: :gin
t.index "lower((username)::text), COALESCE(lower((domain)::text), ''::text)", name: "index_accounts_on_username_and_domain_lower", unique: true