How to validate and out-put execution of SQL statement using Liquibase

I am using liquibase version 4.3.x to create a table using formatted SQL file. I am running Jenkins job that runs shell script that invokes liquibase to executes sql file and the output shows only [2021-08-04 13:00:00] INFO [liquibase.changelog] Custom SQL executed. I am using --logLevel=info.

Questions

  • Is there a way using liquibase to validate whether table has been successfully created on the MySQL database without having to ssh to the database server and running sql command from mysql client to verify the same?
  • Can actual table creation output be logged into Liquibase log file so that DBA can verify that log file for actual execution of SQL statement?

The execution of custom sql should be shown in the Liquibase output. I’m using an older version of Liiquibase (3.10), with logLevel=info, and here is the output I see:

13:16:10.896 INFO [liquibase.executor.jvm.JdbcExecutor]: GRANT SELECT ON test_department TO read_only_role
13:16:10.900 INFO [liquibase.changelog.ChangeSet]: Custom SQL executed
13:16:10.902 INFO [liquibase.changelog.ChangeSet]: ChangeSet db-changelog-3.xml::grant_select_on_test_department::author1 ran success

Liquibase doesn’t validate that a table has been successfully created, but I suppose you could add a second changeset with a sqlcheck precondition to check for the table.