diff --git a/README.md b/README.md index 3706ade7..ff161821 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ To use an **H2 in-memory database** populated with sample-data. To use an **H2 file-based database**, start the application with the h2file profile: gw bootRun -Ph2file - gw bootRun -Ph2file,sample-data # populated with sample data + gw bootRun -Ph2file -Psample-data # populated with sample data To use a **local Postgres database**, first prepare your environment: @@ -54,7 +54,7 @@ Where `DBNAME`, `DBUSER` and `DBPASS` are replaced by your credentials. Then start the application with the pgsql profile: gw bootRun -Ppgsql - gw bootRun -Ppgsql,sample-data # populated with sample data + gw bootRun -Ppgsql -Psample-data # populated with sample data To use a **remote Postgres database** on a hostsharing server, diff --git a/build.gradle b/build.gradle index 8a5d617c..1902c6d5 100644 --- a/build.gradle +++ b/build.gradle @@ -165,6 +165,9 @@ liquibase { defaultSchemaName '' logLevel 'debug' classpath 'src/main/resources/' + if (project.hasProperty('sample-data')) { + contexts 'sample-data' + } } diffLog { driver '' diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 2e045b77..8a2c6e53 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -49,8 +49,6 @@ spring: hibernate.cache.use_second_level_cache: false hibernate.cache.use_query_cache: false hibernate.generate_statistics: true - liquibase: - contexts: dev mail: host: localhost port: 25 diff --git a/src/main/resources/config/application-h2file.yml b/src/main/resources/config/application-h2file.yml index bd53c6ff..6f13aad7 100644 --- a/src/main/resources/config/application-h2file.yml +++ b/src/main/resources/config/application-h2file.yml @@ -18,5 +18,3 @@ spring: jpa: database-platform: io.github.jhipster.domain.util.FixedH2Dialect database: H2 - liquibase: - contexts: dev diff --git a/src/main/resources/config/application-pgsql.yml b/src/main/resources/config/application-pgsql.yml index d4c07954..b4faca72 100644 --- a/src/main/resources/config/application-pgsql.yml +++ b/src/main/resources/config/application-pgsql.yml @@ -15,5 +15,3 @@ spring: jpa: database-platform: io.github.jhipster.domain.util.FixedPostgreSQL82Dialect database: POSTGRESQL - liquibase: - contexts: dev