Using includeObjects/excludeObjects with generateChangeLog

In this Jira item (https://liquibase.jira.com/browse/CORE-875) it says that includeObjects/excludeObjects has been added for generateChangeLog in the command line utility. I’m trying to use it with generateChangeLog but Liquibase (3.5.0) says that includeObjects is an unknown parameter. Should this parameter work with generateChangeLog or only with diffs?

Thanks

Sean


It appears that it only works for diff and diffChangeLog, not got generateChangeLog.


Here is a chunk of the source code for the command line (see https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/integration/commandline/Main.java#L299-L329 to see it in context)
}
Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

For others seeing this - I have confirmed that I can use the includeObjects/excludeObjects with the generateChangeLog Ant task, but not with the Liquibase command line.

I haven’t looked into it deeply, but if it is possible to use those options with the Ant task, it might be a very simple code change to get it working from the command line.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Yes, I would think that would be the case, can you add that to Jira?

Thanks

Sean

I created https://liquibase.jira.com/browse/CORE-2847

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Nathan has closed CORE-2847 - it appears you just need to put the arguments in the correct place on the command line.

The --includeObjects and --excludeObjects argument is specific to diffChangeLog and generateChangeLog, so it goes after the command. Like: "liquibase --changeLogFile= generateChangeLog --includeObjects=DEPT"

Steve Donie Principal Software Engineer Datical, Inc. http://www.datical.com/

Yes, thanks, I verified that works just fine.

Thanks!

Sean

I’d like you ask you for advice…
until now I has such cmdline:
liquibase -changeLogFile=test.informix.sql generateChangeLog
now I want to exclude one table … syscolformats
I tried to add --excludeObjects=“syscolformats” but without success.
What should my cmdline look like?

Hi @roze,

Could you show me exactly your commandline you tried? As mentioned the include and exclude statements have to go right after the generateChangeLog command as that command consumes the --excludeObjects

Also, what DB platform are you using (Oracle, mysql, etc?)

Thanks,

Ronak

I use Informix DB platform. I want to exclude syscolformats table.
I tried to run:
/liquibase --changeLogFile=informix.sql generateChangeLog --excludeObjects=syscolformats

The command ends in error…
Unexpected command parameter: ‘–excludeObjects=syscolformats’

@roze, thanks for the reply, now that I have my informix environment setup I have one more ask now that I understand the issue better…we are just trying to exclude a table named

right? Wonder if

needs additional items like database.syscolformats

I am participating in a project that has been developed for many years. At one time, Informix NewEra SW was used . This SW tool created a number of sys * tables. These tables are not part of the Informix system catalog. Two tables:
syscolformats
syssvwformats
contain a column named ‘case’ (!) - now it is a reserved word
https://www.ibm.com/support/knowledgecenter/en/SSEQTP_8.5.5/com.ibm.etools.ejbbatchdeploy.doc/topics/rsqlINFORMIX_V117.html

and Liquibase crashes on these tables.

Before deleting the tables from the schema, I wanted to work around this problem with ‘–excludeObjects’.
Apparently I didn’t use the correct syntax?

So, you are right…I just trying to exclude this two tables named:
syscolformats
syssvwformats

So did qualifying the table name work? Like