Add alt text for preview card thumbnails (#26184)
This commit is contained in:
parent
ca19ea30d4
commit
8da99ffb0d
9 changed files with 258 additions and 100 deletions
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class AddImageDescriptionToPreviewCards < ActiveRecord::Migration[7.0]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
safety_assured { add_column_with_default :preview_cards, :image_description, :string, default: '', allow_null: false }
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :preview_cards, :image_description
|
||||
end
|
||||
end
|
|
@ -802,6 +802,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_08_03_112520) do
|
|||
t.boolean "trendable"
|
||||
t.integer "link_type"
|
||||
t.datetime "published_at"
|
||||
t.string "image_description", default: "", null: false
|
||||
t.index ["url"], name: "index_preview_cards_on_url", unique: true
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue