Skip to content
Ameen Abozaid
Planned lessonJNR-033-L01

Why the schema needs version control

  • Lesson 1 of 6
  • Junior
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.sql runs drift: dev, test, and production end up different.
  • spring.jpa.hibernate.ddl-auto=update guesses 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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.