Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: #287 DBインデックスの重複の解決 #680

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

class FixDuplicateIndicesForKmyblueOriginalFunctions < ActiveRecord::Migration[7.1]
def change
remove_index :antenna_accounts, :antenna_id
remove_index :antenna_domains, :antenna_id
remove_index :antenna_tags, :antenna_id
remove_index :bookmark_category_statuses, :bookmark_category_id
remove_index :circle_accounts, :circle_id
remove_index :circle_statuses, :circle_id
remove_index :list_statuses, :list_id
end
end
9 changes: 1 addition & 8 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2024_03_26_231854) do
ActiveRecord::Schema[7.1].define(version: 2024_03_27_234026) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

Expand Down Expand Up @@ -276,7 +276,6 @@
t.datetime "updated_at", precision: nil, null: false
t.index ["account_id"], name: "index_antenna_accounts_on_account_id"
t.index ["antenna_id", "account_id"], name: "index_antenna_accounts_on_antenna_id_and_account_id", unique: true
t.index ["antenna_id"], name: "index_antenna_accounts_on_antenna_id"
t.index ["exclude"], name: "index_antenna_accounts_on_exclude"
end

Expand All @@ -287,7 +286,6 @@
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["antenna_id", "name"], name: "index_antenna_domains_on_antenna_id_and_name", unique: true
t.index ["antenna_id"], name: "index_antenna_domains_on_antenna_id"
t.index ["exclude"], name: "index_antenna_domains_on_exclude"
t.index ["name"], name: "index_antenna_domains_on_name"
end
Expand All @@ -299,7 +297,6 @@
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.index ["antenna_id", "tag_id"], name: "index_antenna_tags_on_antenna_id_and_tag_id", unique: true
t.index ["antenna_id"], name: "index_antenna_tags_on_antenna_id"
t.index ["exclude"], name: "index_antenna_tags_on_exclude"
t.index ["tag_id"], name: "index_antenna_tags_on_tag_id"
end
Expand Down Expand Up @@ -390,7 +387,6 @@
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["bookmark_category_id", "status_id"], name: "index_bc_statuses", unique: true
t.index ["bookmark_category_id"], name: "index_bookmark_category_statuses_on_bookmark_category_id"
t.index ["bookmark_id"], name: "index_bookmark_category_statuses_on_bookmark_id"
t.index ["status_id"], name: "index_bookmark_category_statuses_on_status_id"
end
Expand Down Expand Up @@ -446,7 +442,6 @@
t.datetime "updated_at", null: false
t.index ["account_id"], name: "index_circle_accounts_on_account_id"
t.index ["circle_id", "account_id"], name: "index_circle_accounts_on_circle_id_and_account_id", unique: true
t.index ["circle_id"], name: "index_circle_accounts_on_circle_id"
t.index ["follow_id"], name: "index_circle_accounts_on_follow_id"
end

Expand All @@ -456,7 +451,6 @@
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["circle_id", "status_id"], name: "index_circle_statuses_on_circle_id_and_status_id", unique: true
t.index ["circle_id"], name: "index_circle_statuses_on_circle_id"
t.index ["status_id"], name: "index_circle_statuses_on_status_id"
end

Expand Down Expand Up @@ -792,7 +786,6 @@
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["list_id", "status_id"], name: "index_list_statuses_on_list_id_and_status_id", unique: true
t.index ["list_id"], name: "index_list_statuses_on_list_id"
t.index ["status_id"], name: "index_list_statuses_on_status_id"
end

Expand Down
1 change: 1 addition & 0 deletions lib/tasks/dangerous.rake
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ namespace :dangerous do
20240312230204
20240320231633
20240326231854
20240327234026
)
# Removed: account_groups
target_tables = %w(
Expand Down
Loading