Why the schema needs version control
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
explain why manual schema scripts and ddl-auto fail.
Planned topics
- Code is versioned in Git, but the database lives elsewhere; they must change together.
- Manual
schema.sqlruns drift: dev, test, and production end up different. spring.jpa.hibernate.ddl-auto=updateguesses changes, cannot rename or drop safely, and must not be used outside throwaway experiments.- A migration is a small numbered SQL script, applied once, in order.
- The database remembers which ones ran.
Draft outline details
Demonstration
a diagram: V1 → V2 → V3 applied to dev, test, and production in the same order.
Check your understanding
Why not ddl-auto=update in production?
Show answer
It guesses changes and can be unsafe or incomplete; schema changes must be explicit and reviewed.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.