0
0
Fork 0

Add alt text for preview card thumbnails (#26184)

This commit is contained in:
Christian Schmidt 2023-08-03 15:41:51 +02:00 committed by GitHub
parent ca19ea30d4
commit 8da99ffb0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 258 additions and 100 deletions

View file

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

View file

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