Comments (3)
@rhobolic thanks for your issue.
As you can see by the path the SQL is written for h2:
https://github.com/devonfw/devon4j/blob/master/templates/server/src/main/resources/archetype-resources/batch/src/main/resources/db/migration/h2/V0005__Add_batch_tables.sql
As we recommend(ed) to use h2 database for JUnit testing, we had written the SQL for h2.
There are tons of databases out there and it does not seem feasible to support all of them.
So to be direct I would assume your expectation is wrong here. If you change the suggestions and assumptions e.g. switching from h2 to postgresql you are also in charge of chaning the SQL accordingly.
@maihacke do you have some cents on this?`Why did we actually have to use very h2 specific SQL here if we could have done it in a DB agnostic way?
@maybeec as we are switching strategies (esp. for quarkus) to use docker for DB in JUnits, how should we proceed here?
Is it wrong in general that we started all such stuff in a framework like manner and taking responsibility of DDL for products like spring-batch that we do not own? Most probably we had to add the DDL in order to be able to insert testdata via flyway while hibernates hbm2auto-ddl auto feature can create tables for you but acts after flyway has taken action...
from devon4j.
@hohwille honestly saying I started to remove H2 support in most of my projects I am in and run DB on demand with docker as all my projects are at least kubenetes deployments.
That brings several advantages as I faced several workarounds in tests to run on H2.
In addition H2 isn't even faster in some cases. So if possible run tests against the target dB in a container brings a lot of advantages with sometimes depending on the DB with costs on test duration. But especially in a real continuous development project you anyhow want to test your feature branches as realistic as possible to not introduce issues you haven't seen with H2.
My voting would be to get rid of H2 by default and propose DB in a container whenever possible.
from devon4j.
@maihacke do you have some cents on this?`Why did we actually have to use very h2 specific SQL here if we could have done it in a DB agnostic way?
I'm not very sure, but propably it is because of the identity columns. Propably there is no hibernate orm magic here which decouples this from the database technology and spring batch just assumes that the column is handled by the DB.
@hohwille honestly saying I started to remove H2 support in most of my projects
I second this. But this has also a strong impact on CI/CD. But all in all the hassle with the containers (even in CI/CD) is better to solve than having to adopt the implementation (or tests) to different databases.
from devon4j.
Related Issues (20)
- Sample application should submit the status of ships via kafka HOT 1
- Devon4j release test HOT 2
- MTS - Quarkus - bookingmanagement HOT 1
- JWT support in Quarkus
- Consider removing mmm dependencies
- Validate devon4j modules with latest features. HOT 1
- Analysis devon4j kafka HOT 3
- Validate devon4j web module HOT 3
- Validate devon4j rest module HOT 1
- Validate devon4j logging module HOT 3
- Cobigen generates ToTest which is not supporting SortedSet
- Simplify app-template
- Update devon4j DAO list example in wiki
- Failed to create bean with name 'configurationPropertiesBeans'
- QueryHelper: Dynamic operator support for Comparable types
- Release with latest micro versions (spring-boot 2.6.14) HOT 1
- Release with latest minor versions (spring-boot 2.7.6 and cxf to 3.5.4) HOT 1
- Release with latest major versions (spring-boot 3.0.0)
- Conisder new CVE updates (cxf, jackson, snakeyaml, etc.) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devon4j.