Backward compatibility keeps existing interfaces, behavior, and stored data usable while a service evolves. A new appointment category can be added without requiring older appointments or clients to provide it. section 2.3.2
A practical evolution pattern is to:
- Add the database column without making it mandatory. section 2.3.2
- Update request handling and data models to accept the new field. section 2.3.2
- Use a later migration to assign defaults before enforcing the field as mandatory. section 2.3.2
Adding appointment categories
The Appointments service adds a nullable category column, persists and returns the value, and continues retrieving or updating older appointments that lack category information. section 2.3.2
Listing 2.4 Schema migration to add a new column to Appointments.
-- +goose Up ALTER TABLE appointments ADD COLUMN category VARCHAR(255); -- +goose Down ALTER TABLE appointments DROP COLUMN category;
Inspect the Goose migration that adds and removes the optional category column. section 2.3.2





















