I have a spring boot application. I want to use liquibase with this application i have added the liquibase dependency in pom.xml. Please find the "liquibase-changelog.xml" file details below :-
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet author="iftekharkhan" id="changeset-1">
<sqlFile dbms="postgres" encoding="utf8" path="changelog/createTable.sql"
relativeToChangelogFile="true" />
</changeSet>
</databaseChangeLog>
createTable.sql
CREATE TABLE IF NOT EXISTS dummy
(
id serial, name varchar(255));
application.properties
spring.datasource.platform=postgres
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=Sunny@310591
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.default_schema=flow
liquibase.change-log=classpath:db/liquibase-changelog.xml
spring.datasource.driver=org.postgresql.Driver
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
This table is not getting created in the DB even after running my application. Can anyone please help me where am i going wrong!
Logs :-
INFO 2/5/18 11:12 PM: liquibase: Successfully acquired change log lock
INFO 2/5/18 11:12 PM: liquibase: Reading from public.databasechangelog
INFO 2/5/18 11:12 PM: liquibase: classpath:db/liquibase-changelog.xml: classpath:db/liquibase-changelog.xml::changeset-3::iftekharkhan: ChangeSet classpath:db/liquibase-changelog.xml::changeset-3::iftekharkhan ran successfully in 1ms
INFO 2/5/18 11:12 PM: liquibase: Successfully released change log lock