From f3acc08ac6721bd2b38e59e0ca61f98829d66a6b Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 21 Mar 2024 11:24:54 +0100 Subject: [PATCH] Revert severed relationships migrations --- ...e_account_relationship_severance_events.rb | 9 ++++ ...846_revert_create_severed_relationships.rb | 9 ++++ ...rt_create_relationship_severance_events.rb | 9 ++++ db/schema.rb | 42 +------------------ 4 files changed, 28 insertions(+), 41 deletions(-) create mode 100644 db/migrate/20240321101830_revert_create_account_relationship_severance_events.rb create mode 100644 db/migrate/20240321101846_revert_create_severed_relationships.rb create mode 100644 db/migrate/20240321101915_revert_create_relationship_severance_events.rb diff --git a/db/migrate/20240321101830_revert_create_account_relationship_severance_events.rb b/db/migrate/20240321101830_revert_create_account_relationship_severance_events.rb new file mode 100644 index 0000000000..733e8501bd --- /dev/null +++ b/db/migrate/20240321101830_revert_create_account_relationship_severance_events.rb @@ -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 diff --git a/db/migrate/20240321101846_revert_create_severed_relationships.rb b/db/migrate/20240321101846_revert_create_severed_relationships.rb new file mode 100644 index 0000000000..c000d77ee5 --- /dev/null +++ b/db/migrate/20240321101846_revert_create_severed_relationships.rb @@ -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 diff --git a/db/migrate/20240321101915_revert_create_relationship_severance_events.rb b/db/migrate/20240321101915_revert_create_relationship_severance_events.rb new file mode 100644 index 0000000000..1c3baf1ef8 --- /dev/null +++ b/db/migrate/20240321101915_revert_create_relationship_severance_events.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index cd66ff750b..5ed678bd12 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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