Closed NathanGrenier closed 7 months ago
Vercel Preview URL :rocket: : https://soen-341-p57sqf90q-nathangreniers-projects.vercel.app Neon branch :elephant: : https://console.neon.tech/app/projects/shiny-smoke-03744977/branches/br-dawn-king-a5yf8v68
Just remember a few things:
Just remember a few things:
The server upload is limited to 4.5MB
You need to delete the blob whenever you delete a database entry with a reference to it
Since we 'disable' an entry when we delete it, I'm guessing the blob gets destroyed? So if for ever reason we re enable an entry, the blob will need to be manually updated? Makes we wonder if we should have a default image for all tombstones ..
Since we 'disable' an entry when we delete it, I'm guessing the blob gets destroyed? So if for ever reason we re enable an entry, the blob will need to be manually updated? Makes we wonder if we should have a default image for all tombstones ..
Huh? I'm talking about the cars. Currently they're the only ones that store URLs to the blobs in the other database. If you delete a car but not the blob, there's no longer a way to access it (and delete it).
Since we 'disable' an entry when we delete it, I'm guessing the blob gets destroyed? So if for ever reason we re enable an entry, the blob will need to be manually updated? Makes we wonder if we should have a default image for all tombstones ..
Huh? I'm talking about the cars. Currently they're the only ones that store URLs to the blobs in the other database. If you delete a car but not the blob, there's no longer a way to access it (and delete it).
Yea I get that issue. But whenever we actually delete anything, according to the schema, we just put it to disabled. So technically there is still an ID that can be fetched at all times to this 'deleted' vehicle containing the blob. But I'm thinking about if we delete the blob associated with it, if instead we should reassign it a default image.
Yea I get that issue. But whenever we actually delete anything, according to the schema, we just put it to disabled. So technically there is still an ID that can be fetched at all times to this 'deleted' vehicle containing the blob. But I'm thinking about if we delete the blob associated with it, if instead we should reassign it a default image.
I mean... I would consider reservations tightly coupled to a car, but I see what you mean.
I think the solution is to delete the car entry and blob only if there are no reservations associated with it. If there's a reservation that references a car that needs to be deleted, the car will be set to booking_disabled = true
and will only get deleted when all of the reservations are done.
Another alternative is to never delete anything and only allow REPs to disable or update the car entries.
🛠 Proposed Changes:
Added vercel blob storage to project.
📝 Details:
🔗 Related Issue(s):