mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-27 18:10:58 +00:00
Separate remote thumbnails into cache/ directory (#36911)
This commit is contained in:
parent
687f3a2a01
commit
48fe679728
|
|
@ -5,28 +5,29 @@
|
||||||
# Table name: media_attachments
|
# Table name: media_attachments
|
||||||
#
|
#
|
||||||
# id :bigint(8) not null, primary key
|
# id :bigint(8) not null, primary key
|
||||||
# status_id :bigint(8)
|
# blurhash :string
|
||||||
# file_file_name :string
|
# description :text
|
||||||
# file_content_type :string
|
# file_content_type :string
|
||||||
|
# file_file_name :string
|
||||||
# file_file_size :integer
|
# file_file_size :integer
|
||||||
|
# file_meta :json
|
||||||
|
# file_storage_schema_version :integer
|
||||||
# file_updated_at :datetime
|
# file_updated_at :datetime
|
||||||
|
# processing :integer
|
||||||
# remote_url :string default(""), not null
|
# remote_url :string default(""), not null
|
||||||
|
# shortcode :string
|
||||||
|
# thumbnail_content_type :string
|
||||||
|
# thumbnail_file_name :string
|
||||||
|
# thumbnail_file_size :integer
|
||||||
|
# thumbnail_remote_url :string
|
||||||
|
# thumbnail_storage_schema_version :integer
|
||||||
|
# thumbnail_updated_at :datetime
|
||||||
|
# type :integer default("image"), not null
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# shortcode :string
|
|
||||||
# type :integer default("image"), not null
|
|
||||||
# file_meta :json
|
|
||||||
# account_id :bigint(8)
|
# account_id :bigint(8)
|
||||||
# description :text
|
|
||||||
# scheduled_status_id :bigint(8)
|
# scheduled_status_id :bigint(8)
|
||||||
# blurhash :string
|
# status_id :bigint(8)
|
||||||
# processing :integer
|
|
||||||
# file_storage_schema_version :integer
|
|
||||||
# thumbnail_file_name :string
|
|
||||||
# thumbnail_content_type :string
|
|
||||||
# thumbnail_file_size :integer
|
|
||||||
# thumbnail_updated_at :datetime
|
|
||||||
# thumbnail_remote_url :string
|
|
||||||
#
|
#
|
||||||
|
|
||||||
class MediaAttachment < ApplicationRecord
|
class MediaAttachment < ApplicationRecord
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class AddThumbnailStorageSchemaVersion < ActiveRecord::Migration[8.0]
|
||||||
|
def change
|
||||||
|
add_column :media_attachments, :thumbnail_storage_schema_version, :integer
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -727,6 +727,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_11_19_093332) do
|
||||||
t.integer "thumbnail_file_size"
|
t.integer "thumbnail_file_size"
|
||||||
t.datetime "thumbnail_updated_at", precision: nil
|
t.datetime "thumbnail_updated_at", precision: nil
|
||||||
t.string "thumbnail_remote_url"
|
t.string "thumbnail_remote_url"
|
||||||
|
t.integer "thumbnail_storage_schema_version"
|
||||||
t.index ["account_id", "status_id"], name: "index_media_attachments_on_account_id_and_status_id", order: { status_id: :desc }
|
t.index ["account_id", "status_id"], name: "index_media_attachments_on_account_id_and_status_id", order: { status_id: :desc }
|
||||||
t.index ["scheduled_status_id"], name: "index_media_attachments_on_scheduled_status_id", where: "(scheduled_status_id IS NOT NULL)"
|
t.index ["scheduled_status_id"], name: "index_media_attachments_on_scheduled_status_id", where: "(scheduled_status_id IS NOT NULL)"
|
||||||
t.index ["shortcode"], name: "index_media_attachments_on_shortcode", unique: true, opclass: :text_pattern_ops, where: "(shortcode IS NOT NULL)"
|
t.index ["shortcode"], name: "index_media_attachments_on_shortcode", unique: true, opclass: :text_pattern_ops, where: "(shortcode IS NOT NULL)"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user