in the ActiveStorage::Blob class on the initialization we have
after_initialize do
self.service_name ||= self.class.service.name
end
but the self.service_name does not exist
my guess is that I have miss some migrations step on the upgrade ?
in the ActiveStorage::Blob class on the initialization we have
after_initialize do
self.service_name ||= self.class.service.name
end
but the self.service_name does not exist
my guess is that I have miss some migrations step on the upgrade ?
Looks like https://github.com/rails/rails/pull/34935 added a new column. You could use a migration like this https://github.com/gmcgibbon/rails/blob/master/activestorage/db/update_migrate/20190112182829_add_service_name_to_active_storage_blobs.rb
Hi @ghiculescu, thanks for the heads up
as stated on the PR the command to update is rails active_storage:update
will try this, hoping to not blow up my previous images ![]()
You should be fine! It looks like the task just adds these migrations.
yup , it works , just wondering what will happen with the already uploaded files
I’ve created a PR for the documentation on release notes https://github.com/rails/rails/pull/40791
You should be fine. I just did this on one of my sites. The images were preserved. However, I belive the variants will need to be regenerated, because I think the stucture of the path have changed. On 6.1 the variant paths are similar to original image paths. They are now relatively short random strings.