To make the location ID more user-friendly and so that it is not confused with the "localhost" DNS name, we should rename the default location from "localhost" to "Default".
This is a little tricky because the name of the location is the primary key of the table and it has foreign key references to several other tables (node, scanreports, and eventually monitoringsystems). The correct procedure for this is probably:
- Use liquibase to delete current foreign key references that are only ON DELETE CASCADE.
- Reinstate the foreign key references with ON DELETE CASCADE ON UPDATE CASCADE versions.
- Then, just use an UPDATE call to change the name from "localhost" to "Default". The update will then cascade into the other tables.
We don't have any other ON UPDATE CASCADE foreign keys in the database but I think it's appropriate here since there's an off chance that users will want to update a location name (since it is human-readable) without mucking around in several database tables.