hi,
i’m using liquibase to create a diff of 2 postgres databases and generating a changelog.xml.
next step is to use this diff file to upgrade an existing oracle database instance to the desired state.
oracle and postgres are using different data types in some cases, so the import is going to fail with the generated postgres changelog.
i would like to specify something like typedef for database oracle and set eg.: in value “bigint” to output type “number”.
there is an old ticket showing that this should be implemented in liquibase: https://liquibase.jira.com/browse/CORE-422
but i didn’t found the typedef in the liquibase xsd and it’s not working
question: am i missing something or using liquibase wrong and is there an option to use the typedef?
another option would be to replace the types in the changelog file before importing, but I would like to avoid that …
To answer your question, let me make sure I am understanding you properly, you want to be able to change certain keywords in a generated changelog that will make it compatible with the new target to be updated right?
…
now i’d like to use this changelog file to update an existing postgresql database, but some types are not existing. So it is necessary to replace the value of newDataType=“BIGINT” to a valid postgresql datatype of “number19”, like:
so, if there is a possibility to add something like a type match - if dmbs=“oracle” then datatype BIGINT is modified to NUMBER, it would be possible to specify the datatypes and use the same changelog file for different dmbs eg. oracle and postgres.
Yes, I think of liquibase more like a ledger for db changes that are applied within a CICD pipeline. So just like a web server will already be created for the latest webapp deployment in a CICD pipeline, the target database is assumed to be there.