Commit 50f7d14a authored by Matija Obreza's avatar Matija Obreza
Browse files

Setup database from liquibase-changeLog.yml

- mvn liquibase:generateChangelog
- Use mvn liquibase:diff to generate the update changeset
parent f812ac21
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.genesys-pgr</groupId>
......@@ -62,18 +63,61 @@
<version>${liquibase.version}</version>
<configuration>
<changeSetAuthor>auto-generated</changeSetAuthor>
<outputChangeLogFile>${project.basedir}/src/main/resources/liquibase/liquibase-changeLog.yml</outputChangeLogFile>
<changeLogFile>${project.basedir}/src/main/resources/liquibase/liquibase-changeLog.yml</changeLogFile>
<diffChangeLogFile>${project.basedir}/src/main/resources/liquibase/liquibase-changeLog-diff.yml</diffChangeLogFile>
<outputFileEncoding>UTF-8</outputFileEncoding>
<url>jdbc:mysql://localhost/catalog1?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false&amp;useSSL=false</url>
<username>root</username>
<driver>com.mysql.jdbc.Driver</driver>
<referenceUrl>jdbc:mysql://localhost/catalog?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false&amp;useSSL=false</referenceUrl>
<referenceUsername>root</referenceUsername>
<detail>true</detail>
</configuration>
<executions>
<execution>
<id>default-cli</id>
<configuration>
<outputChangeLogFile>${project.basedir}/src/main/resources/liquibase/liquibase-initial.yml</outputChangeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost/catalog?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false&amp;useSSL=false</url>
<username>root</username>
</configuration>
</execution>
<execution>
<id>update</id>
<configuration>
<diffChangeLogFile>${project.basedir}/src/main/resources/liquibase/liquibase-changeLog-diff.yml</diffChangeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost/catalog?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false&amp;useSSL=false</url>
<username>root</username>
<referenceUrl>jdbc:mysql://localhost/catalogproduction?useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false&amp;useSSL=false</referenceUrl>
<referenceUsername>root</referenceUsername>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.genesys-pgr</groupId>
<artifactId>genesys-catalog-core</artifactId>
<version>0.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-hibernate4</artifactId>
<version>3.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${spring.data.version}</version>
</dependency>
</dependencies>
</plugin>
<!--buildNumber-->
<!--buildNumber -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
......@@ -88,8 +132,8 @@
</execution>
</executions>
<configuration>
<!-- first check to see if you have locally modified files, and will
fail if there are any. -->
<!-- first check to see if you have locally modified files, and will
fail if there are any. -->
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<shortRevisionLength>8</shortRevisionLength>
......
......@@ -15,12 +15,15 @@ db.driverClassName=com.mysql.jdbc.Driver
db.username=root
db.password=
db.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
db.showSql=false
db.updateSchema=false
db.showSql=true
# Connection pool
db.pool.initialSize=5
db.pool.maxActive=10
# WARNING: Make sure liquibase-changeLog.yml contains required changes. Do not rely on db.updateSchema!
db.updateSchema=false
default.admin.email=admin@example.com
default.admin.password=Admin123!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment