Revert severed relationships migrations

This commit is contained in:
Claire 2024-03-21 11:24:54 +01:00
parent 885d0faf83
commit f3acc08ac6
4 changed files with 28 additions and 41 deletions

View File

@ -0,0 +1,9 @@
# frozen_string_literal: true
require_relative '20240320140159_create_account_relationship_severance_events'
class RevertCreateAccountRelationshipSeveranceEvents < ActiveRecord::Migration[7.1]
def change
revert CreateAccountRelationshipSeveranceEvents
end
end

View File

@ -0,0 +1,9 @@
# frozen_string_literal: true
require_relative '20240312105620_create_severed_relationships'
class RevertCreateSeveredRelationships < ActiveRecord::Migration[7.1]
def change
revert CreateSeveredRelationships
end
end

View File

@ -0,0 +1,9 @@
# frozen_string_literal: true
require_relative '20240312100644_create_relationship_severance_events'
class RevertCreateRelationshipSeveranceEvents < ActiveRecord::Migration[7.1]
def change
revert CreateRelationshipSeveranceEvents
end
end

View File

@ -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_20_163441) do
ActiveRecord::Schema[7.1].define(version: 2024_03_21_101915) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -90,17 +90,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_03_20_163441) do
t.index ["target_account_id"], name: "index_account_pins_on_target_account_id"
end
create_table "account_relationship_severance_events", force: :cascade do |t|
t.bigint "account_id", null: false
t.bigint "relationship_severance_event_id", null: false
t.integer "relationships_count", default: 0, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["account_id", "relationship_severance_event_id"], name: "idx_on_account_id_relationship_severance_event_id_7bd82bf20e", unique: true
t.index ["account_id"], name: "index_account_relationship_severance_events_on_account_id"
t.index ["relationship_severance_event_id"], name: "idx_on_relationship_severance_event_id_403f53e707"
end
create_table "account_stats", force: :cascade do |t|
t.bigint "account_id", null: false
t.bigint "statuses_count", default: 0, null: false
@ -882,15 +871,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_03_20_163441) do
t.string "url"
end
create_table "relationship_severance_events", force: :cascade do |t|
t.integer "type", null: false
t.string "target_name", null: false
t.boolean "purged", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["type", "target_name"], name: "index_relationship_severance_events_on_type_and_target_name"
end
create_table "relays", force: :cascade do |t|
t.string "inbox_url", default: "", null: false
t.string "follow_activity_id"
@ -970,21 +950,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_03_20_163441) do
t.index ["thing_type", "thing_id", "var"], name: "index_settings_on_thing_type_and_thing_id_and_var", unique: true
end
create_table "severed_relationships", force: :cascade do |t|
t.bigint "relationship_severance_event_id", null: false
t.bigint "local_account_id", null: false
t.bigint "remote_account_id", null: false
t.integer "direction", null: false
t.boolean "show_reblogs"
t.boolean "notify"
t.string "languages", array: true
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["local_account_id", "relationship_severance_event_id"], name: "index_severed_relationships_on_local_account_and_event"
t.index ["relationship_severance_event_id", "local_account_id", "direction", "remote_account_id"], name: "index_severed_relationships_on_unique_tuples", unique: true
t.index ["remote_account_id"], name: "index_severed_relationships_on_remote_account_id"
end
create_table "site_uploads", force: :cascade do |t|
t.string "var", default: "", null: false
t.string "file_file_name"
@ -1263,8 +1228,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_03_20_163441) do
add_foreign_key "account_notes", "accounts", on_delete: :cascade
add_foreign_key "account_pins", "accounts", column: "target_account_id", on_delete: :cascade
add_foreign_key "account_pins", "accounts", on_delete: :cascade
add_foreign_key "account_relationship_severance_events", "accounts", on_delete: :cascade
add_foreign_key "account_relationship_severance_events", "relationship_severance_events", on_delete: :cascade
add_foreign_key "account_stats", "accounts", on_delete: :cascade
add_foreign_key "account_statuses_cleanup_policies", "accounts", on_delete: :cascade
add_foreign_key "account_warnings", "accounts", column: "target_account_id", on_delete: :cascade
@ -1357,9 +1320,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_03_20_163441) do
add_foreign_key "scheduled_statuses", "accounts", on_delete: :cascade
add_foreign_key "session_activations", "oauth_access_tokens", column: "access_token_id", name: "fk_957e5bda89", on_delete: :cascade
add_foreign_key "session_activations", "users", name: "fk_e5fda67334", on_delete: :cascade
add_foreign_key "severed_relationships", "accounts", column: "local_account_id", on_delete: :cascade
add_foreign_key "severed_relationships", "accounts", column: "remote_account_id", on_delete: :cascade
add_foreign_key "severed_relationships", "relationship_severance_events", on_delete: :cascade
add_foreign_key "status_edits", "accounts", on_delete: :nullify
add_foreign_key "status_edits", "statuses", on_delete: :cascade
add_foreign_key "status_pins", "accounts", name: "fk_d4cb435b62", on_delete: :cascade