H2 2.1.210 Table "CONSTRAINTS" not found
See original GitHub issueEnvironment
Liquibase Version:
3.10.3
Liquibase Integration & Version: Spring boot 2.4.13
Liquibase Extension(s) & Version: None
Database Vendor & Version: H2 2.1.210
Operating System Type & Version: Ubuntu Linux 21.10
Description
When trying to use H2 2.1.210 Liquibase fails when trying to read the constraints
table. It appears in recent H2 versions is it now called table_constraints
.
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "CONSTRAINTS" not found; SQL statement:
select CONSTRAINT_NAME, CONSTRAINT_TYPE, TABLE_NAME from information_schema.constraints where constraint_schema='PUBLIC' and constraint_catalog='74681ECE-17BA-4149-B979-E8C4E193D43F' and constraint_type='UNIQUE' and table_name='DATABASECHANGELOGLOCK' [42102-210]
This appears to be because there is no specific case for H2 in JdbcDatabaseSnapshot
.
Steps To Reproduce
List the steps to reproduce the behavior.
- Update H2 to 2.1.210
Additional Context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Upgrading H2 database gives constraint not found exception
212 but it gives a constraint not found exception when I try to do so. The SQL is like this: CREATE TABLE itineraries...
Read more >ErrorCode - H2 Database Engine
The error with code 21002 is thrown when the number of columns does not match. The error with code 90075 is thrown when...
Read more >Bug #4932: Error in reports after upgrade from H2 1.4.197 to ...
The [*] in the error message indicates the word on which the H2 statement parser had a problem, it is not part of...
Read more >Newest 'h2' Questions - Stack Overflow
I am learning spring security with JPA auth againest H2 table. ... junit test fails : data jpa query not working with H2...
Read more >subject:"\[h2\] H2" - The Mail Archive
[h2] H2 version 2.1.210 droping public table on its own ... H2Test$TestTrigger"" not found [90086-196]" I tried several things but i ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nealeu Hi, what is the problem with 4.6.x? I’m about to wrap up migration from 3.8.7!!! to 4.13.0. I ran in quite a few nasty, subtle, deep-rooted bugs, not only this one (which is now luckily easy to fix, cause I worked around all precursor bugs). Had to fix / work around the following bugs:
Maybe this writeup helps you with all the bugs. At least these were the bugs i encounted on the way up to 4.13.0 from 3.8.7.
Finally: If some liquibase dev reads this, maybe it would be useful to start to write up a wiki page where all these bugs are collected with suggested workarounds for other people, so others don’t have to go through all these steps, which partially require a lot of patience and debugging skills. Don’t give up. It takes time.
@nvoxland Due to https://github.com/liquibase/liquibase/issues/2385, we cannot move to 4.7+. I can’t even validate 4.6.x with H2 2, so it’s really getting quite impossible to move beyond H2 1.x and Liquibase 3.x without a massive rewrite to workaround #2385.