Currently Liquibase has some limitations when you try to generate change logs on an existing database. It does not export the following types of objects:
- Stored procedures, functions, packages
- Triggers
- Types
Reference: http://www.liquibase.org/documentation/generating_changelogs.html
As far as I understand I need to develop my own liquibase.snapshot.SnapshotGenerator
implementation. I know how to obtain these types of objects from Oracle but I'm a bit lost on how to implement such interface from Liquibase.
Ideally I guess the liquibase.database.Database
interface should be also extended to add the following extra methods:
public abstract boolean supportsPackages();
public abstract boolean supportsFunctions();
public abstract boolean supportsStoredProcedures();
public abstract boolean supportsTriggers();
public abstract boolean supportsTypes();
You are right that the general strategy is to create a new class that implements SnapshotGenerator, but there are a couple other steps you need to do as well. The general snapshot process is: