Add reference attribute

This commit is contained in:
KMY 2023-09-20 08:57:11 +09:00
parent a2d4a9295d
commit b59c41cf41
5 changed files with 50 additions and 39 deletions

View file

@ -0,0 +1,15 @@
# frozen_string_literal: true
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
class AddAttributeToStatusReferences < ActiveRecord::Migration[7.0]
include Mastodon::MigrationHelpers
disable_ddl_transaction!
def change
safety_assured do
add_column :status_references, :attribute_type, :string
end
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_11_022527) do
ActiveRecord::Schema[7.0].define(version: 2023_09_19_232836) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -1132,6 +1132,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_11_022527) do
t.bigint "target_status_id", null: false
t.datetime "created_at", precision: nil, null: false
t.datetime "updated_at", precision: nil, null: false
t.string "attribute_type"
t.index ["status_id"], name: "index_status_references_on_status_id"
t.index ["target_status_id"], name: "index_status_references_on_target_status_id"
end