liquibase / liquibase-oracle

Liquibase extension to add improved Oracle support
Apache License 2.0
44 stars 40 forks source link

Liquibase extension for Oracle NoSQL database #116

Open RamyaKappagantu opened 1 year ago

RamyaKappagantu commented 1 year ago

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?

FBurguer commented 1 year ago

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

RamyaKappagantu commented 1 year ago

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

FBurguer commented 1 year ago

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 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!