liquibase-oracle icon indicating copy to clipboard operation
liquibase-oracle copied to clipboard

Liquibase extension for Oracle NoSQL database

Open RamyaKappagantu opened this issue 2 years ago • 3 comments

Hi, I would like to know if there's a Liquibase extension for Oracle NoSQL database or any documentation on how Liquibase supports Oracle NoSQL database?

RamyaKappagantu avatar Nov 11 '22 10:11 RamyaKappagantu

Hi! Right now we currently dont. You are welcome to work on it (or anybody who is interested) and we will try to support it through the process! Thanks for submitting this issue

FBurguer avatar Nov 15 '22 16:11 FBurguer

Hi @FBurguer, I'm interested to work on this one. Could you let me know on how I can get started?

RamyaKappagantu avatar Nov 16 '22 11:11 RamyaKappagantu

Given that I've not gotten it well documented yet, the best thing is probably to point them to an existing database-support extension like https://github.com/liquibase/liquibase-cassandra or https://github.com/liquibase/liquibase-mongodb The overall process is:

  1. Create a new liquibase.database.Database implementation like https://github.com/liquibase/liquibase-cassandra/blob/main/src/main/java/liquibase/ext/cassandra/database/CassandraDatabase.java For it to be used, it gets registered via META-INF/services files like https://github.com/liquibase/liquibase-cassandra/blob/main/src/main/resources/META-INF/services/liquibase.database.Database

  2. Run the Liquibase CLI with that extension in the classpath and see what fails next Usually what might fail first (especially for nosql databases) is the lock service and the history service. Can create replacements for those like https://github.com/liquibase/liquibase-cassandra/blob/main/src/main/java/liquibase/ext/cassandra/changelog/CassandraChangeLogHistoryService.java and https://github.com/liquibase/liquibase-cassandra/blob/main/src/main/java/liquibase/ext/cassandra/lockservice/LockServiceCassandra.java (also registered in META-INF/services) until they let you run liquibase update on an empty changelog

  3. Create a changeset and make sure that runs This is the end of the first milestone. You now have working liquibase support, although you can't do <createTable> etc. change types or snapshot based logic. If you don't want that anyway, then it's completely done

  4. If/when you do want custom change types and snapshot, you add *SqlGenerator and *SnapshotGenerator implementations until what you need to work is working.

Liquibase have a lot of extensions for particular databases in liquibase org and if you are interestd in having us host a repo for liquibase-oracle-nosql we can certainly do that.

If you have any questions you can always make a post in the forum, make another issue or joining the discord (you can dm @nvoxland there).

I hope this helps!

FBurguer avatar Nov 17 '22 12:11 FBurguer