556
edits
Line 33: | Line 33: | ||
=== Database === | === 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 | * Created migration scripts to upgrade and downgrade any database changes. The benefit of this is it makes it easy to seed the database with valid locations while minimising the risk of the changes causing a problem to the live database through a failed action (the migration is transactional so an error will cause it to rollback to the previous stable state and not leave it in a horrible half migrated mess) | ||
=== Database Design === | === Database Design === |