Skip to the content.

Database

The app keeps its data in an embedded H2 database, one file in the per-user data folder that AppPaths picks for each OS. Nothing has to be installed: on every start Flyway runs any migration in src/main/resources/db/migration that hasn’t run yet.

Migration What it does
V1__schema.sql Creates the four tables below
V2__demo_data.sql Adds two logins, three courses and a few fictional students with attendance
V3__student_card_id.sql Adds student.card_id VARCHAR(64), unique and nullable, and gives demo students 1001–1006 the cards DEMO-1001 to DEMO-1006

To change the schema, add a new V4__what_it_does.sql. Never edit a migration that has already been released: Flyway checks each one’s checksum and refuses to start if one has changed.

Tables

The tables admin, course, student and student_attendance, and how they relate

Things worth knowing