It looks simple. One line in a migration file. But a new column is a schema change, and schema changes cut through every layer of the system. The wrong move can lock tables, stall writes, or slow queries until users feel the lag.
A good new column design starts with intent. Define the name and type with clarity. Avoid vague naming. Keep types strict—integers for counts, timestamps for events, strings for text only. Set defaults where needed to prevent null chaos.
Next is compatibility. Always plan for code and schema to run side by side during deploys. Read from old schema until the new column is ready in production. Write to both old and new columns if migration logic demands it. This avoids downtime during rollout.
Think about indexes. A new column may need one, but indexing too early can cause locks. Add indexes in separate migrations where load is low.