Use database migrations to manage changes to table structures
Use Flyway to manage database migrations
Instructions
Fork this repository
Clone your fork to your machine
Open the project in IntelliJ
Core Activity
Following on from the activity we did previously to build a Film Database, start by modifying your Flyway Config to point at the db/migrations directory in this project.
Connect things up so that you will be creating the database on ElephantSQL as before.
In the migrations directory use Flyway to initially create a monolithic table to match the structure shown below.
Then work through the process of adding scripts to migrate the database structure until you end up with a normalised database similar to the one you had in the previous activity.
When you have reached that point, then you can add a further script that will add in the data shown to the completed database.
For an extra challenge you could make use of some of the data that can be found in the datasets here to use some real data, but don't spend too long on it (also don't try to add too much data to your database).
Extension Activity
Modify the database structure further to bring in additional tables (such as Cast) which will link together a film id with multiple actors.
Modify the database so that Actors, Directors and Writers are all references to a Person table (that way the same person can have multiple roles in a film.)