GenerateChangelog for specific tables in schema

Hi,

Is it possible to generateChangelog for specific tables in a schema ?

Thank You.

Hi @Ashad

Yes it is possible to generate changelog for a specific table from a schema. Run the below command to achieve this :

liquibase --changeLogFile=dbchangelog.xml --url=<DBURL> --username=<DBUSER> --password=<DBPASS> --includeSchema=true --schemas=<SchemaName> --includeObjects=table:<tableName> generateChangeLog

eg:

liquibase --changeLogFile=dbchangelog.xml --url=jdbc:postgresql://localhost:5432/prddb --username=dba --password=password -–includeSchema=true -–schemas=schemaA --includeObjects=table:tab1 generateChangeLog

Please read more about includeObjects here.

2 Likes

Thanks. This is what I was looking for. I could not find any thing about the includeobjects in official document for generateChangelog arguments.

Happy to help! :slight_smile:
Yeah I see there is nothing mentioned about includeObjects in generateChangelog document.

1 Like