mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Add image_remote_url to PreviewCard
This commit is contained in:
parent
520ff04248
commit
86346ad04b
3 changed files with 16 additions and 1 deletions
|
@ -33,6 +33,7 @@
|
|||
# published_at :datetime
|
||||
# image_description :string default(""), not null
|
||||
# author_account_id :bigint(8)
|
||||
# image_remote_url :string
|
||||
#
|
||||
|
||||
class PreviewCard < ApplicationRecord
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddImageRemoteURLToPreviewCards < ActiveRecord::Migration[7.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
safety_assured { add_column :preview_cards, :image_remote_url, :string }
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :preview_cards, :image_remote_url
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2024_07_24_181224) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2024_08_03_160904) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
|
@ -880,6 +880,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_07_24_181224) do
|
|||
t.datetime "published_at"
|
||||
t.string "image_description", default: "", null: false
|
||||
t.bigint "author_account_id"
|
||||
t.string "image_remote_url"
|
||||
t.index ["author_account_id"], name: "index_preview_cards_on_author_account_id", where: "(author_account_id IS NOT NULL)"
|
||||
t.index ["url"], name: "index_preview_cards_on_url", unique: true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue