https://github.com/perty/h2example
An example using H2 as database engine, storing on file.
https://github.com/perty/h2example
Last synced: 12 months ago
JSON representation
An example using H2 as database engine, storing on file.
- Host: GitHub
- URL: https://github.com/perty/h2example
- Owner: perty
- Created: 2022-12-02T13:01:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-01T19:19:50.000Z (over 3 years ago)
- Last Synced: 2025-03-12T07:44:36.381Z (over 1 year ago)
- Language: Java
- Size: 63.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# H2 example with Spring boot
## Purpose
Try using H2 to store data in a file easily. Evaluate how this works with schema migration by Flyway. Evaluate if it is feasible for running in cheap cloud environment, such as [fly.io](https://fly.io), instead of Postgres in a separate process.
Deployment with a Docker image that has the datastore mounted.
Use this in a class for beginners.
## Notes
The file path can not be relative, it has to be absolute.
The H2 console works although not the prettiest thing seen. Can it be made simpler for beginners? It is built in JSP! Oops.
Using IntelliJ's database tools seems to work fine, like any other database.
If I have a connection to the file-db already, I can't start a new process that connects to it. File is probably locked, good.