Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update liquibase version to 4.15.0 #19242

Merged
merged 14 commits into from Aug 27, 2022

Conversation

DanielFran
Copy link
Member

@DanielFran DanielFran commented Jul 26, 2022

Fix #17529

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@DanielFran DanielFran marked this pull request as ready for review July 26, 2022 21:47
@DanielFran DanielFran marked this pull request as draft July 26, 2022 22:53
@DanielFran
Copy link
Member Author

@mshima With liquibase 4.14.0, autoincrement have been fixed for mysql/mariadb/h2 (see here)
Do not remember if we should make any changes here:

} else if (entityWithConfig.reactive) {
field.liquibaseAutoIncrement = field.fieldType === LONG;
field.jpaGeneratedValue = false;
field.autoGenerateByService = !field.liquibaseAutoIncrement;
field.autoGenerateByRepository = !field.autoGenerateByService;
field.requiresPersistableImplementation = !field.liquibaseAutoIncrement;
field.readonly = true;
} else {
const defaultGenerationType = entityWithConfig.prodDatabaseType === MYSQL ? 'identity' : 'sequence';
field.jpaGeneratedValue = field.jpaGeneratedValue || field.fieldType === LONG ? defaultGenerationType : true;
field.autoGenerateByService = false;
field.autoGenerateByRepository = true;
field.requiresPersistableImplementation = false;
field.readonly = true;
if (field.jpaGeneratedValue === 'identity') {
field.liquibaseAutoIncrement = true;
}

@DanielFran DanielFran requested a review from mshima July 27, 2022 19:09
@mshima
Copy link
Member

mshima commented Jul 27, 2022

@mshima With liquibase 4.14.0, autoincrement have been fixed for mysql/mariadb/h2 (see here) Do not remember if we should make any changes here:

} else if (entityWithConfig.reactive) {
field.liquibaseAutoIncrement = field.fieldType === LONG;
field.jpaGeneratedValue = false;
field.autoGenerateByService = !field.liquibaseAutoIncrement;
field.autoGenerateByRepository = !field.autoGenerateByService;
field.requiresPersistableImplementation = !field.liquibaseAutoIncrement;
field.readonly = true;
} else {
const defaultGenerationType = entityWithConfig.prodDatabaseType === MYSQL ? 'identity' : 'sequence';
field.jpaGeneratedValue = field.jpaGeneratedValue || field.fieldType === LONG ? defaultGenerationType : true;
field.autoGenerateByService = false;
field.autoGenerateByRepository = true;
field.requiresPersistableImplementation = false;
field.readonly = true;
if (field.jpaGeneratedValue === 'identity') {
field.liquibaseAutoIncrement = true;
}

Not needed.

@mshima mshima marked this pull request as ready for review July 27, 2022 23:24
@mshima mshima marked this pull request as draft July 27, 2022 23:25
@DanielFran DanielFran changed the title Update liquibase version to 4.14.0 Update liquibase version to 4.15.0 Aug 5, 2022
@mshima
Copy link
Member

mshima commented Aug 5, 2022

Try updating h2-r2dbc

@mshima
Copy link
Member

mshima commented Aug 6, 2022

Maybe we should try to update h2 only at imperative

@mraible
Copy link
Contributor

mraible commented Aug 17, 2022

Can y'all please fix the conflicts in this PR?

@mshima mshima closed this Aug 23, 2022
@mshima mshima reopened this Aug 23, 2022
@mshima
Copy link
Member

mshima commented Aug 27, 2022

@DanielFran tests succeeded.

@DanielFran DanielFran marked this pull request as ready for review August 27, 2022 18:35
@DanielFran DanielFran merged commit da2e1c1 into jhipster:main Aug 27, 2022
@pascalgrimaud pascalgrimaud added this to the 7.9.3 milestone Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade H2 database to 2.0.206+
4 participants