DEV: Move hotlinked image information into a dedicated table (#16585)

This will make future changes to the 'pull hotlinked images' system easier. This commit should not introduce any functional change.

For now, the old post_custom_field data is kept in the database. This will be dropped in a future commit.
This commit is contained in:
David Taylor
2022-05-03 13:53:32 +01:00
committed by GitHub
parent d8ce4228da
commit c1db968740
9 changed files with 164 additions and 58 deletions

View File

@@ -1447,11 +1447,6 @@ describe Post do
context "#link_post_uploads" do
it "finds all the uploads in the post" do
post.custom_fields[Post::DOWNLOADED_IMAGES] = {
"/#{upload_path}/original/1X/1/1234567890123456.csv": attachment_upload.id
}
post.save_custom_fields
post.link_post_uploads
expect(PostUpload.where(post: post).pluck(:upload_id)).to contain_exactly(