The domain layer talked about a consignment, the database called it a shipment, and both terms appeared in the same conversation with different meanings.
// the domain
final class Consignment
{
public function dispatch(Courier $c): DispatchNote { /* ... */ }
}
// the persistence layer
class ShipmentRecord extends Model
{
protected $table = 'shipments';
}
// the mapping, in one place, documented
// Consignment ←→ shipments row + shipment_lines rows
// a consignment is one dispatch. a shipment row is one
// parcel. they are 1:N and the names suggested 1:1.
Renaming the table was possible and would have cost a migration and a week of coordination for a word. Documenting the translation at the boundary was cheaper and is the honest version of what a ubiquitous language gets you in a system with history: the language is consistent inside the domain, and the mapping to the old vocabulary is written down where somebody will find it.