According to Rails Guide, it says
- From: Media
- To: Medium
All of the objects had not had any attachment.
ActiveStrage is the polymorphic model. So, the records were still looking at the old model. Then, the association is cut.
ActiveStorage::Attachment.where(record_type: "Media").update(record_type: "Medium")