Demo: baselining Shop with Flyway and adding V2
On This Lesson 3 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
convert Shop's manual schema to Flyway; prepares JNR-033-LAB1.
Draft outline details
Step by step
- Add Flyway; copy the current
schema.sqlintoV1__baseline.sql. - Set
spring.jpa.hibernate.ddl-auto=validate. - Start on a fresh empty database; show the history table.
- For the existing database, enable baseline on migrate with baseline version 1 and start; V1 is skipped.
- Planned mistake: edit V1 after it ran; show the checksum error, revert, and add
V2__add_sku.sqlwith a backfill instead. - Compare both databases: same state.
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.