1

I have a schema (for application users) where only one script (creating synonyms) runs. I don't have INSERT/UPDATE/CREATE privileges on that schema. Can I suppress the creation of audit tables (i.e. DATABASECHANGELOGLOCK & DATABASECHANGELOG tables) in that schema? If yes, how can I do that?

Also, can someone please tell me, when the first ever deployment is done, how & where the code identifies that these audit tables are getting created for the first time in the schema? Please help.

Vaibhav Gupta
  • 353
  • 1
  • 2
  • 17

2 Answers2

1

Liquibase is supposed to be connected to the database and is supposed to have enough privileges to function. databasechangelog and databasechangeloglock tables are vital for schema changes tracking. So, no, you can not suppress the creation of these tables.

And to answer the second part of your question (I could be wrong about this one):

I suppose it's not the case, but FYI Liquibase has the "Offline Mode" for cases when you don't have a direct access to the database. Here's the documentation for Offline Database Support.

Instead of creating tables in your database, it'll create (by default) databasechangelog.csv file in your working directory.

htshame
  • 6,599
  • 5
  • 36
  • 56
1

If you don't have INSERT/UPDATE/CREATE on that schema, then you should set up the project (i.e. in your liquibase.properties file or in your POM or however you set this sort of thing in your application) so that the Liqiubase tracking tables are kept in a schema you do have access to. You don't want to not create them, as that would remove almost all the benefit of using Liquibase. The property to set is called liquibaseSchemaName

The other answer here from @htshame regarding the location of the code is correct.

SteveDonie
  • 8,700
  • 3
  • 43
  • 43