Merge branch 'master' into feature/#10_Create_period_overview
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<packaging.type>jar</packaging.type>
|
<packaging.type>jar</packaging.type>
|
||||||
<activeProfiles>hsqldb,dev</activeProfiles>
|
<activeProfiles>h2,dev</activeProfiles>
|
||||||
<deploymentProfile>mk</deploymentProfile>
|
<deploymentProfile>mk</deploymentProfile>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
|
|
||||||
<!-- Runtime dependencies -->
|
<!-- Runtime dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hsqldb</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
<artifactId>hsqldb</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
spring.flyway.locations=classpath:/database/h2,classpath:/database/common
|
||||||
|
|
||||||
|
# DataSource
|
||||||
|
spring.datasource.url=jdbc:h2:mem:.;DB_CLOSE_DELAY=-1
|
||||||
|
spring.datasource.username=sa
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
spring.flyway.locations=classpath:/database/hsqldb,classpath:/database/common
|
|
||||||
|
|
||||||
# DataSource
|
|
||||||
#spring.datasource.url=jdbc:hsqldb:file:/tmp/financer
|
|
||||||
spring.datasource.url=jdbc:hsqldb:mem:.
|
|
||||||
spring.datasource.username=sa
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
UPDATE account SET account_group_id = (SELECT id FROM account_group WHERE name = 'Car') WHERE "key" IN ('Car', 'Gas')
|
UPDATE account SET account_group_id = (SELECT id FROM account_group WHERE name = 'Car') WHERE "key" IN ('Car', 'Gas');
|
||||||
|
|
||||||
UPDATE account SET account_group_id = (SELECT id FROM account_group WHERE name = 'Housing') WHERE "key" IN ('Rent', 'FVS', 'Electricity/Water')
|
UPDATE account SET account_group_id = (SELECT id FROM account_group WHERE name = 'Housing') WHERE "key" IN ('Rent', 'FVS', 'Electricity/Water');
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
-- Account group table
|
-- Account group table
|
||||||
CREATE TABLE period (
|
CREATE TABLE period (
|
||||||
id BIGINT NOT NULL PRIMARY KEY IDENTITY,
|
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
type VARCHAR(255) NOT NULL,
|
type VARCHAR(255) NOT NULL,
|
||||||
start DATETIME NOT NULL,
|
start DATETIME NOT NULL,
|
||||||
"end" DATETIME
|
"end" DATETIME
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE link_transaction_period (
|
CREATE TABLE link_transaction_period (
|
||||||
id BIGINT NOT NULL PRIMARY KEY IDENTITY,
|
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
transaction_id BIGINT NOT NULL,
|
transaction_id BIGINT NOT NULL,
|
||||||
period_id BIGINT NOT NULL,
|
period_id BIGINT NOT NULL,
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
-- Account statistic table
|
-- Account statistic table
|
||||||
CREATE TABLE account_statistic (
|
CREATE TABLE account_statistic (
|
||||||
id BIGINT NOT NULL PRIMARY KEY IDENTITY,
|
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
account_id BIGINT NOT NULL,
|
account_id BIGINT NOT NULL,
|
||||||
period_id BIGINT NOT NULL,
|
period_id BIGINT NOT NULL,
|
||||||
spending_total_from BIGINT NOT NULL,
|
spending_total_from BIGINT NOT NULL,
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
-- Account table
|
-- Account table
|
||||||
CREATE TABLE account (
|
CREATE TABLE account (
|
||||||
id BIGINT NOT NULL PRIMARY KEY IDENTITY,
|
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
"key" VARCHAR(1000) NOT NULL, --escape keyword "key"
|
"key" VARCHAR(1000) NOT NULL, --escape keyword "key"
|
||||||
type VARCHAR(255) NOT NULL,
|
type VARCHAR(255) NOT NULL,
|
||||||
status VARCHAR(255) NOT NULL,
|
status VARCHAR(255) NOT NULL,
|
||||||
@@ -15,7 +15,7 @@ CREATE TABLE account (
|
|||||||
|
|
||||||
-- Recurring transaction table
|
-- Recurring transaction table
|
||||||
CREATE TABLE recurring_transaction (
|
CREATE TABLE recurring_transaction (
|
||||||
id BIGINT NOT NULL PRIMARY KEY IDENTITY,
|
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
from_account_id BIGINT NOT NULL,
|
from_account_id BIGINT NOT NULL,
|
||||||
to_account_id BIGINT NOT NULL,
|
to_account_id BIGINT NOT NULL,
|
||||||
description VARCHAR(1000),
|
description VARCHAR(1000),
|
||||||
@@ -32,7 +32,7 @@ CREATE TABLE recurring_transaction (
|
|||||||
|
|
||||||
-- Transaction table
|
-- Transaction table
|
||||||
CREATE TABLE "transaction" ( --escape keyword "transaction"
|
CREATE TABLE "transaction" ( --escape keyword "transaction"
|
||||||
id BIGINT NOT NULL PRIMARY KEY IDENTITY,
|
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
from_account_id BIGINT NOT NULL,
|
from_account_id BIGINT NOT NULL,
|
||||||
to_account_id BIGINT NOT NULL,
|
to_account_id BIGINT NOT NULL,
|
||||||
"date" DATE NOT NULL, --escape keyword "date"
|
"date" DATE NOT NULL, --escape keyword "date"
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
CREATE TABLE file (
|
CREATE TABLE file (
|
||||||
id BIGINT NOT NULL PRIMARY KEY IDENTITY,
|
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
name NVARCHAR(1000) NOT NULL,
|
name NVARCHAR(1000) NOT NULL,
|
||||||
content NVARCHAR(4000) NOT NULL
|
content NVARCHAR(4000) NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE link_transaction_file (
|
CREATE TABLE link_transaction_file (
|
||||||
id BIGINT NOT NULL PRIMARY KEY IDENTITY,
|
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
transaction_id BIGINT NOT NULL,
|
transaction_id BIGINT NOT NULL,
|
||||||
file_id BIGINT NOT NULL,
|
file_id BIGINT NOT NULL,
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
-- Account group table
|
-- Account group table
|
||||||
CREATE TABLE account_group (
|
CREATE TABLE account_group (
|
||||||
id BIGINT NOT NULL PRIMARY KEY IDENTITY,
|
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
name VARCHAR(1000) NOT NULL,
|
name VARCHAR(1000) NOT NULL,
|
||||||
|
|
||||||
CONSTRAINT un_account_group_name_key UNIQUE (name)
|
CONSTRAINT un_account_group_name_key UNIQUE (name)
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
spring.profiles.active=hsqldb,dev
|
spring.profiles.active=h2,dev
|
||||||
|
|
||||||
spring.datasource.url=jdbc:hsqldb:mem:.
|
spring.datasource.url=jdbc:h2:mem:.;DB_CLOSE_DELAY=-1
|
||||||
spring.datasource.username=sa
|
spring.datasource.username=sa
|
||||||
spring.flyway.locations=classpath:/database/hsqldb,classpath:/database/hsqldb/integration,classpath:/database/common
|
spring.flyway.locations=classpath:/database/h2,classpath:/database/h2/integration,classpath:/database/common
|
||||||
@@ -1,5 +1 @@
|
|||||||
spring.profiles.active=dev
|
spring.profiles.active=dev
|
||||||
|
|
||||||
spring.datasource.url=jdbc:hsqldb:mem:.
|
|
||||||
spring.datasource.username=sa
|
|
||||||
spring.flyway.locations=classpath:/database/hsqldb,classpath:/database/hsqldb/integration,classpath:/database/common
|
|
||||||
|
|||||||
Reference in New Issue
Block a user