BUGFIX: Fix H2 auto increment syntax #2477
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
H2 has updated such that the old auto increment syntax no longer works
Environment
Liquibase Version: 4.7.1
Liquibase Integration & Version: Java embedded
Liquibase Extension(s) & Version: no extensions
Database Vendor & Version: H2 2.1.210
Operating System Type & Version: Ubuntu Linux 21.04
Pull Request Type
Description
H2 has modified its syntax to no longer support AUTO_INCREMENT unless being used in MySQL mode. In other modes, it's been advised that the standard GENERATED AS IDENTITY syntax. Furthermore, it doesn't support the exact syntax so the comma used between the START WITH and INCREMENT BY clauses needed to be (configurably) removed, so I added a means to do just that which only takes effect for H2Database.
Steps To Reproduce
List the steps to reproduce the behavior.
Actual Behavior
Expected/Desired Behavior
Fast Track PR Acceptance Checklist: