Skip to content

Persistence

Lucy Ciara Herud-Thomassen edited this page Apr 23, 2026 · 15 revisions

Persistence in this project is achieved using an H2 database, which stores donation history and user accounts.

Structure

users

CREATE TABLE IF NOT EXISTS
users (
user_id INT PRIMARY KEY,
role VARCHAR(32) NOT NULL,
first_name VARCHAR(32) NOT NULL,
last_name VARCHAR(32) NOT NULL,
email VARCHAR(32) NOT NULL,
password_hash VARCHAR(72) NOT NULL
);

donations

donation_id INT (PRI)
user_id INT (FK) NOT NULL
organization_id INT NOT NULL
amount DECIMAL(32, 16) NOT NULL
dating TIMESTAMP NOT NULL
payment_method VARCHAR(32) NOT NULL
Clone this wiki locally