556
edits
Line 29: | Line 29: | ||
* Current code progress can be found at https://github.com/montyphy/hackspace-foundation-sites/tree/members_storage | * Current code progress can be found at https://github.com/montyphy/hackspace-foundation-sites/tree/members_storage | ||
* Shelf locations will have the format /s\d\db\d\d/ e.g. s01b10. With the first segment (/s\d\d/), e.g. s01, representing the shelving unit and the second segment (/b\d\d\/), e.g. b10, representing the bay on that particular unit. | * Shelf locations will have the format /s\d\db\d\d/ e.g. s01b10. With the first segment (/s\d\d/), e.g. s01, representing the shelving unit and the second segment (/b\d\d\/), e.g. b10, representing the bay on that particular unit. | ||
* Shelf bays will have to be labelled sequentially left to right, bottom to top to account for when people double stack the top bays. | * Shelf bays will have to be labelled sequentially left to right, bottom to top to account for when people double stack the top bays (triple stacking is silly and is not supported). | ||
=== Database === | |||
* Boxes shouldn't be deleted from the database, nor should the owner_id column be set to NULL, as this could result in the loss of useful information such as who owned the box last. Instead, boxes can be marked as inactive or unowned. | * Boxes shouldn't be deleted from the database, nor should the owner_id column be set to NULL, as this could result in the loss of useful information such as who owned the box last. Instead, boxes can be marked as inactive or unowned. | ||
* Created migration scripts to upgrade and downgrade these changes. The benefit is it makes it easy to seed the database with valid locations. It also minimises the risk of the changes causing a problem to the live database since it migration is transactional and will rollback if it fails rather than leave the database in a half migrated state. | |||
=== Database Design === | === Database Design === |