Add quote_approval_policy to Status

This commit is contained in:
Claire 2025-01-20 16:50:33 +01:00
parent 223d7ced76
commit ee49cbd492
3 changed files with 16 additions and 1 deletions

View File

@ -44,6 +44,13 @@ class Status < ApplicationRecord
MEDIA_ATTACHMENTS_LIMIT = 4
QUOTE_APPROVAL_POLICY_FLAGS = {
public: (1 << 0),
followers: (1 << 1),
followed: (1 << 2),
unknown: (1 << 3),
}.freeze
rate_limit by: :account, family: :statuses
self.discard_column = :deleted_at

View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddQuoteApprovalPolicyToStatuses < ActiveRecord::Migration[8.0]
def change
add_column :statuses, :quote_approval_policy, :integer
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_04_04_094808) do
ActiveRecord::Schema[8.0].define(version: 2025_04_04_095029) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"
@ -1098,6 +1098,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_04_04_094808) do
t.boolean "trendable"
t.bigint "ordered_media_attachment_ids", array: true
t.datetime "fetched_replies_at"
t.integer "quote_approval_policy"
t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20190820", order: { id: :desc }, where: "(deleted_at IS NULL)"
t.index ["account_id"], name: "index_statuses_on_account_id"
t.index ["deleted_at"], name: "index_statuses_on_deleted_at", where: "(deleted_at IS NOT NULL)"