From f91df5063489c50ae2590423a3dd79cc1e53b56c Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Fri, 5 Apr 2024 13:18:46 +0200 Subject: [PATCH] Upped h2 dependency --- README.md | 5 +++++ pom.xml | 4 ++-- src/main/resources/db/h2/migration/V0__initial.sql | 4 ++-- src/main/resources/db/h2/migration/V4__add_associations.sql | 6 +++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 094f34e..e73aa93 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,11 @@ cross-institution registrations. - Java 8 - Maven 3 +Set the JAVA_HOME property for maven (example for macOS): +``` +export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/ +``` + ## [Building and running](#building-and-running) ### [The student-mobility-inteken-ontvanger-generiek-server](#student-mobility-inteken-ontvanger-generiek-server) diff --git a/pom.xml b/pom.xml index 199eeb4..8041964 100644 --- a/pom.xml +++ b/pom.xml @@ -38,11 +38,11 @@ org.springframework.boot spring-boot-starter-web - + com.h2database h2 - 1.4.200 + 2.2.224 runtime diff --git a/src/main/resources/db/h2/migration/V0__initial.sql b/src/main/resources/db/h2/migration/V0__initial.sql index e6c3b94..4e79904 100644 --- a/src/main/resources/db/h2/migration/V0__initial.sql +++ b/src/main/resources/db/h2/migration/V0__initial.sql @@ -1,7 +1,7 @@ CREATE TABLE enrollment_requests ( - id BIGINT(20) NOT NULL AUTO_INCREMENT, - identifier VARCHAR(254) NOT NULL, + id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, + identifier VARCHAR(255) NOT NULL, person_uri VARCHAR(255) NOT NULL, results_uri VARCHAR(255) NOT NULL, person_id VARCHAR(255), diff --git a/src/main/resources/db/h2/migration/V4__add_associations.sql b/src/main/resources/db/h2/migration/V4__add_associations.sql index 70525db..8ad6e75 100644 --- a/src/main/resources/db/h2/migration/V4__add_associations.sql +++ b/src/main/resources/db/h2/migration/V4__add_associations.sql @@ -1,8 +1,8 @@ CREATE TABLE associations ( - id BIGINT(20) NOT NULL AUTO_INCREMENT, - association_id VARCHAR(254) NOT NULL, - enrollment_request_id BIGINT(20) NOT NULL, + id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, + association_id VARCHAR(255) NOT NULL, + enrollment_request_id BIGINT NOT NULL, created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, CONSTRAINT fk_enrollment_request_id FOREIGN KEY (enrollment_request_id) REFERENCES enrollment_requests(id) ON DELETE CASCADE );