Helix
Helix copied to clipboard
Move (storage_id, drive_id) link from software to hardware
The table storage_drives
was added to Software domain because it made sense at the time (optimization to avoid extra HeBroker calls) but it's no longer needed.
Now, it makes sense to have it all under Hardware domain, on a table called hdd_storage
(or something like that), as storages are owned by HDD.
In the future, to add referential integrity on the Software domain without having to ask Hardware whether that storage is linked or not, we can add a storage_status
that links the storage_id status to "on" or "off", meaning it's linked or unlinked, respectively.
Albeit we are not going to implement that on the first iteration, a storage can be used by more than one HDD (for RAID)
So, something like
hdd | storage |
---|---|
1 | 4 |
2 | 4 |
3 | 4 |
6 | 2 |
The main advantage on that is that we can easily know which storages are on "store-only" mode (ie: HDD is unplugged so it can not execute actions but keeps stored files) and which are "plugged" easily
And by having that link on hardware, we can easily map a motherboard to the storages that their hdds have, so, I'd say this should come before #83