Forum Stats

  • 3,874,178 Users
  • 2,266,677 Discussions


SQLcl lb: general recommended workflow

Robert__H Member Posts: 17 Green Ribbon
edited Oct 27, 2022 8:49AM in SQLcl

Hi everyone,

I am looking for a generally recommended workflow on how to use SQLcl Liquibase.

I understand that initially one uses lb genschema command to deploy an existing db state into a new db or use lb changelog-sync to onboard existing objects.

For new objects and object changes I currently als use lb genschema because I dont want to track all the objects which were changed manually.

Our pipeline for deployment looks for controller.xml file so I have to delete all existing files before running lb genschema to avoid having controller1.xml a.s.o. which would not be recognized by pipeline).

I also see how lb genobject would be used for this. Doing this its easier to set labels and attributes of specific objects for example to support shared dev environments and selecting specific objects for deployment. But I don't like to add them manually into the controller.xml file due to the effort and potential errors in needed order and completeness.

Now I got stuck a bit when trying to drop objects. I could not find any command useful and also no examples in the docu on how to drop a table for example. Dynamic Object Transformation/DBMS_METADATA is not picking this up automatically like a dropped column for example.

I could try to write my own xml changeset based on traditional liquibase docu but I was hoping that there is better way to have it more automated. May be an option could also be to use lb diff or diff-changelog but this might take lots of time when having lots of objects in the database.

I would appreciate an official workflow recommendation and your general experiences. Thanks!