Rename is_exclusive -> exclusive

Already tested it against the production data of my instance, it's
working!
This commit is contained in:
nachtjasmin 2023-11-23 20:39:51 +01:00
parent b200e4ad1e
commit a99a5fecd2
No known key found for this signature in database
2 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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"