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
- Create the new storage bucket called
files
as explained in the get started documentation. Don't forget to implement the RLS policy. - 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
- 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
- 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
- Refactor/location images by @rockingrohit9639 in #1778
- fix(booking-add-kits): fix search issue on booking add kits by @rockingrohit9639 in #1807
Full Changelog: https://github.com/Shelf-nu/shelf.nu/compare/shelf@1.15.1...shelf@1.16.0