Fabio
Fabio

Reputation: 373

Liquibase use a changelog outside of my jar file

I developed an app that uses Liquibase and built a jar file.

I was wondering if it is possible to use a changelog file that is outside of the jar file , like for example:

-Folder
--jar file
--changelogFile

I know that Liquibase removed the option to use an absolute path , so is there any other way to achieve this?

Upvotes: 3

Views: 739

Answers (1)

Fabio
Fabio

Reputation: 373

Found an answer. If you are using the Java liquibase Api just use a ResourceAccessor

ResourceAccessor accessor= new FileSystemResourceAccessor("C:\\Users\\demo\\Documents\\Migrations");
return new Liquibase(changelog, accessor, connection);

Upvotes: 2

Related Questions