Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Migrate rhythm library from MariaDB to PostgreSQL
Browse files Browse the repository at this point in the history
  • Loading branch information
Izakey committed Mar 18, 2019
1 parent c0790b3 commit 506e31b
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache Fineract CN Rhythm
Copyright [2017-2018] The Apache Software Foundation
Copyright [2017-2019] The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.apache.fineract.cn.test.env.TestEnvironment;
import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
import org.apache.fineract.cn.test.fixture.cassandra.CassandraInitializer;
import org.apache.fineract.cn.test.fixture.mariadb.MariaDBInitializer;
import org.apache.fineract.cn.test.fixture.postgresql.PostgreSQLInitializer;
import org.apache.fineract.cn.test.listener.EnableEventRecording;
import org.apache.fineract.cn.test.listener.EventRecorder;
import org.junit.After;
Expand Down Expand Up @@ -102,14 +102,14 @@ public Logger logger() {

private final static TestEnvironment testEnvironment = new TestEnvironment(APP_NAME);
private final static CassandraInitializer cassandraInitializer = new CassandraInitializer();
private final static MariaDBInitializer mariaDBInitializer = new MariaDBInitializer();
final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, mariaDBInitializer);
private final static PostgreSQLInitializer postgreSQLInitializer = new PostgreSQLInitializer();
final static TenantDataStoreContextTestRule tenantDataStoreContext = TenantDataStoreContextTestRule.forRandomTenantName(cassandraInitializer, postgreSQLInitializer);

@ClassRule
public static TestRule orderClassRules = RuleChain
.outerRule(testEnvironment)
.around(cassandraInitializer)
.around(mariaDBInitializer)
.around(postgreSQLInitializer)
.around(tenantDataStoreContext);

@Rule
Expand Down
2 changes: 1 addition & 1 deletion service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies {
[group: 'org.apache.fineract.cn', name: 'lang', version: versions.frameworklang],
[group: 'org.apache.fineract.cn', name: 'async', version: versions.frameworkasync],
[group: 'org.apache.fineract.cn', name: 'cassandra', version: versions.frameworkcassandra],
[group: 'org.apache.fineract.cn', name: 'mariadb', version: versions.frameworkmariadb],
[group: 'org.apache.fineract.cn', name: 'postgresql', version: versions.frameworkpostgresql],
[group: 'org.apache.fineract.cn', name: 'command', version: versions.frameworkcommand],
[group: 'org.hibernate', name: 'hibernate-validator', version: versions.validator]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.fineract.cn.lang.config.EnableApplicationName;
import org.apache.fineract.cn.lang.config.EnableServiceException;
import org.apache.fineract.cn.lang.config.EnableTenantContext;
import org.apache.fineract.cn.mariadb.config.EnableMariaDB;
import org.apache.fineract.cn.postgresql.config.EnablePostgreSQL;
import org.apache.fineract.cn.permittedfeignclient.config.EnablePermissionRequestingFeignClient;
import org.apache.fineract.cn.rhythm.service.ServiceConstants;
import org.apache.fineract.cn.rhythm.service.internal.identity.ApplicationPermissionRequestCreator;
Expand Down Expand Up @@ -54,7 +54,7 @@
@EnableApiFactory
@EnableAsync
@EnableCassandra
@EnableMariaDB(forTenantContext = false)
@EnablePostgreSQL(forTenantContext = false)
@EnableCommandProcessing
@EnableAnubis
@EnableServiceException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.fineract.cn.command.annotation.CommandHandler;
import org.apache.fineract.cn.command.annotation.CommandLogLevel;
import org.apache.fineract.cn.command.annotation.EventEmitter;
import org.apache.fineract.cn.mariadb.domain.FlywayFactoryBean;
import org.apache.fineract.cn.postgresql.domain.FlywayFactoryBean;
import org.apache.fineract.cn.rhythm.api.v1.events.EventConstants;
import org.apache.fineract.cn.rhythm.service.internal.command.InitializeServiceCommand;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import org.apache.fineract.cn.mariadb.util.LocalDateTimeConverter;
import org.apache.fineract.cn.postgresql.util.LocalDateTimeConverter;

/**
* @author Myrle Krantz
Expand Down
10 changes: 5 additions & 5 deletions service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ cassandra:
write: LOCAL_QUORUM
delete: LOCAL_QUORUM

mariadb:
driverClass: org.mariadb.jdbc.Driver
postgresql:
driverClass: org.postgresql.Driver
database: seshat
host: localhost
port: 3306
user: root
password: mysql
port: 5432
user: postgres
password: postgres

bonecp:
idleMaxAgeInMinutes: 240
Expand Down
2 changes: 1 addition & 1 deletion shared.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ext.versions = [
frameworklang : '0.1.0-BUILD-SNAPSHOT',
frameworkasync : '0.1.0-BUILD-SNAPSHOT',
frameworkcassandra : '0.1.0-BUILD-SNAPSHOT',
frameworkmariadb : '0.1.0-BUILD-SNAPSHOT',
frameworkpostgresql : '0.1.0-BUILD-SNAPSHOT',
frameworkcommand : '0.1.0-BUILD-SNAPSHOT',
frameworktest: '0.1.0-BUILD-SNAPSHOT',
frameworkanubis: '0.1.0-BUILD-SNAPSHOT',
Expand Down

0 comments on commit 506e31b

Please sign in to comment.