dimanche 20 novembre 2016

Liquibase - how to convert existing SQL script for Oracle to another database (Hsqldb)

I have a project that is on Oracle and it is half-way through. I want to convert the integration test cases to use an in-memory database instead for better control of test data and speed.

However, the database scripts we have created have some Oracle specific keywords that prevents them to be executed successfully in HSQLDB, even with HSQLDB in Oracle compatibility mode with.

SET DATABASE SQL SYNTAX ORA TRUE

I understand that Liquibase can have a database neutral set of changelogs and apply them to both Oracle and HSQLDB, but I am not sure if I can use it to do the conversion. For example, can I convert my existing scripts into Liquibase changelog format by adding in the required comments, and then run it against HSQLDB?

One way I can think of is to use the generateChangeLog command but it does not cover all the object types and it does not include data in the tables. Is there any better way of doing this?

Thanks.

Aucun commentaire:

Enregistrer un commentaire