When we generate a changelog for SQL Server and attempt to upload it to another DBMS such as Postgres, there are many errors. The biggest difficulty here is taking all of our SQL Server-based code that shows up after generating a changelog. This appears within the sql tags used in createView, and translating it to Postgres language doesn’t seem easy. In addition there are a number of functions and datatypes referenced within the XML parameters that need to be updated to switch DBMSs. Is there some way when generating a changelog to have it generate in a specified SQL language, as opposed to simply using the language of the source DB?
If I’m not mistaken, the source DB is automatically determined from the jdbc-string in the url.
Thanks for the response! So, actually, I specifically do NOT want it in the language of the source DB. You’re right that it seems to correctly figure out the source DB. But I want it to then generate in the language of a different DB that I specify in the properties file or generateChangeLog command.
I.e. Migrating from SQL Server DB to Postgres DB
Liquibase will only generate syntax for the target database type specified in the url. Converting between dbms platform-specific code is not really a use-case for Liquibase.
Good to know Daryl! So currently I use the “url” property within my properties file for generating the changelog, but I do not use the “referenceUrl” property. Could I potentially specify my Postgres DB in “url” and my SQL Server DB in “referenceUrl”, to then get the changelog to generate my SQL Server DB information in a Postgres DB format?
I do not think that use case is supported, but you will need to test it.
Just tested it in both ways, switching which DB was the referenceUrl. Neither way worked the way I would like.
I was pretty sure it wouldn’t work. Liquibase is not really a dbms code-conversion tool.