Skip to content

Refactor location images - shelf@1.16.0

Latest
Compare
Choose a tag to compare
@DonKoko DonKoko released this 28 May 10:01
· 9 commits to main since this release
bd1a57a

Refactor location images

When we first built the locations functionality we took some bad decisions, namely storing location images as blobs in the DB. Due to how locations work this turned into a bit issue that we needed to address and fix.
To do this we have completely refactored the how we manage location images and we now store them in our storage on supabase. Below you can find a migration guide

Migration guide

  1. Create the new storage bucket called files as explained in the get started documentation. Don't forget to implement the RLS policy.
  2. Once the bucket is created you can run the db migrations which will create the new columns in the Location table, where we will store the image and thumbnail image
  3. Now you can get to moving. You can navigate to /admin-dashboard/move-location-images. There you will find a feature that will allow you move the images easily. The max images to move at a time is 150, to prevent timeouts. If any of the images in your DB are corrupted the functionality will take care of either:
  • fix them if they are fixable
  • ignore them if a fix is not possible

Screenshot 2025-05-28 at 12 59 52

  1. Your migration is done. If you choose to do so, you can clean up your Image table. Make sure you don't remove images connected to organizations.

What's Changed

Full Changelog: https://github.com/Shelf-nu/shelf.nu/compare/shelf@1.15.1...shelf@1.16.0