ugoira: remove the PixivUgoiraFrameData model.

Remove the last remaining uses of the PixivUgoiraFrameData model. As of
32bfb8407, Ugoira frame data is now stored in the MediaMetadata model,
under the `Ugoira:FrameDelays` EXIF field.

The pixiv_ugoira_frame_data table still exists, but it can be removed
after this commit is deployed.

Fixes #5264: Error when replacing with ugoira.
This commit is contained in:
evazion
2022-10-10 18:21:30 -05:00
parent a23c02d0cb
commit c2adf279ee
14 changed files with 31 additions and 104 deletions

View File

@@ -58,7 +58,6 @@ class Post < ApplicationRecord
has_one :media_asset, -> { active }, foreign_key: :md5, primary_key: :md5
has_one :media_metadata, through: :media_asset
has_one :artist_commentary, :dependent => :destroy
has_one :pixiv_ugoira_frame_data, class_name: "PixivUgoiraFrameData", foreign_key: :md5, primary_key: :md5
has_one :vote_by_current_user, -> { active.where(user_id: CurrentUser.id) }, class_name: "PostVote" # XXX using current user here is wrong
has_many :flags, :class_name => "PostFlag", :dependent => :destroy
has_many :appeals, :class_name => "PostAppeal", :dependent => :destroy
@@ -1406,7 +1405,7 @@ class Post < ApplicationRecord
:last_comment_bumped_at, :last_commented_at, :last_noted_at,
:uploader, :approver, :parent,
:artist_commentary, :flags, :appeals, :notes, :comments, :children,
:approvals, :replacements, :pixiv_ugoira_frame_data],
:approvals, :replacements],
current_user: current_user
)
@@ -1630,7 +1629,7 @@ class Post < ApplicationRecord
# attributes accessible through the ?only= parameter
%i[
uploader approver flags appeals events parent children notes
comments approvals disapprovals replacements pixiv_ugoira_frame_data
comments approvals disapprovals replacements
artist_commentary media_asset ai_tags
]
end