From 88240ba6b3d331dd06f871bc48ff2641147aea4a Mon Sep 17 00:00:00 2001 From: Umair Khalid Date: Fri, 30 Mar 2018 00:54:29 +0500 Subject: [PATCH 1/2] Added documentation for postgresql configuration --- .../docs/guide/postgresqlAsDatasource.adoc | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/main/docs/guide/postgresqlAsDatasource.adoc diff --git a/src/main/docs/guide/postgresqlAsDatasource.adoc b/src/main/docs/guide/postgresqlAsDatasource.adoc new file mode 100644 index 0000000..2db13f4 --- /dev/null +++ b/src/main/docs/guide/postgresqlAsDatasource.adoc @@ -0,0 +1,34 @@ +Edit `build.gradle` + +[source,groovy] +.build.gradle +---- +dependencies { + //... + + runtime 'postgresql:postgresql-jdbc42:9.4.1208-atlassian-hosted' <1> +---- +<1> Add the PostreSQL JDBC driver as a dependency + +include::{commondir}/common-warningDependencyNotBuildscriptDependency.adoc[] + +Edit `application.yml` + +[source,yml] +.grails-app/conf/application.yml +---- +dataSource: + pooled: true + jmxExport: true + driverClassName: org.postgresql.Driver + dialect: org.hibernate.dialect.PostgreSQL9Dialect + username: testUser + password: testing +environments: + development: + dataSource: + dbCreate: update + url: jdbc:postgresql://localhost:5432/db_name +---- +<1> Change the `driverClassName` and `dialect` to PostgreSQL settings +<2> This assumes you have a local PostgreSQL instance with a database named `db_name` From 5de141732d48ea8a7cf7c5f51c5c4fcfa8e4a848 Mon Sep 17 00:00:00 2001 From: Umair Khalid Date: Sun, 1 Apr 2018 22:14:36 +0500 Subject: [PATCH 2/2] Trying to resolve Travis Cli problems' --- src/main/docs/guide/postgresqlAsDatasource.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/docs/guide/postgresqlAsDatasource.adoc b/src/main/docs/guide/postgresqlAsDatasource.adoc index 2db13f4..2321618 100644 --- a/src/main/docs/guide/postgresqlAsDatasource.adoc +++ b/src/main/docs/guide/postgresqlAsDatasource.adoc @@ -30,5 +30,5 @@ environments: dbCreate: update url: jdbc:postgresql://localhost:5432/db_name ---- -<1> Change the `driverClassName` and `dialect` to PostgreSQL settings +<1> Change the `driverClassName` and `dialect` to PostgreSQL setting <2> This assumes you have a local PostgreSQL instance with a database named `db_name`