No, there is no problem with the sql tag itself.
The Problem is that the database schema and some initial config data will be rolled out on different database systems.
But MySQL for example does not understand ‘default values’, in this case it must be ‘insert into foobar (id) values (null)’ instead.
I resolved this issue now by using a placeholder for that part of the sql string.
My solution looks right now like this:
insert into foobar ${default-values}
It works this way, but it looks a bit ugly. It would be much nicer, if i could just write
or
and liquibase would transform it into the proper sql statement depending on the current dbms.
Maybe that feature could come in a future version?
Thanks and Regards,
Marco
-
Learn
-
Resources
-
Free Tools
OSS Risk Scanner Database DevOps Risk AssessmentCheat Sheets
Snowflake + Liquibase Databricks + Liquibase -
eBooks
6 Liquibase Community Risks & How to Avoid Guide: SOC 2 Compliance at the Database Layer Guide: Quantify the Value of Liquibase Secure -
Comparison Guides
Liquibase vs. Flyway Liquibase vs. Bytebase Liquibase Community vs Liquibase Secure
-
- Quickstart
- Get Started
- Documentation
- University
-
Resources
- Connect
- Contribute
- Join
- Blog