From a99a5fecd22709aeb22980fd6dcdd8bf5fbb78aa Mon Sep 17 00:00:00 2001 From: nachtjasmin Date: Thu, 23 Nov 2023 20:39:51 +0100 Subject: [PATCH] Rename is_exclusive -> exclusive Already tested it against the production data of my instance, it's working! --- ...195926_migrate_hometown_exclusive_lists_to_mastodon.rb | 8 ++++++++ db/schema.rb | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20231123195926_migrate_hometown_exclusive_lists_to_mastodon.rb diff --git a/db/migrate/20231123195926_migrate_hometown_exclusive_lists_to_mastodon.rb b/db/migrate/20231123195926_migrate_hometown_exclusive_lists_to_mastodon.rb new file mode 100644 index 000000000..6b72df4de --- /dev/null +++ b/db/migrate/20231123195926_migrate_hometown_exclusive_lists_to_mastodon.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +class MigrateHometownExclusiveListsToMastodon < ActiveRecord::Migration[7.0] + def up + List.where(is_exclusive: true).in_batches.update_all(exclusive: :is_exclusive) # rubocop:disable Rails/SkipsModelValidations + safety_assured { remove_column :lists, :is_exclusive } + end +end diff --git a/db/schema.rb b/db/schema.rb index 37020c2d7..299225406 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.0].define(version: 2023_09_07_150100) do +ActiveRecord::Schema[7.0].define(version: 2023_11_23_195926) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -116,6 +116,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do t.integer "min_reblogs" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.boolean "keep_local", default: false t.index ["account_id"], name: "index_account_statuses_cleanup_policies_on_account_id" end @@ -977,7 +978,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_150100) do t.bigint "account_id", null: false t.bigint "application_id" t.bigint "in_reply_to_account_id" + t.boolean "local_only" t.bigint "poll_id" + t.string "activity_pub_type" t.datetime "deleted_at", precision: nil t.datetime "edited_at", precision: nil t.boolean "trendable"