Init DB schema (#1)

* Initial commit

* init DB schema
This commit is contained in:
vitaxa 2019-04-29 12:53:39 +03:00 committed by GitHub
parent 9297e07a59
commit ec6fb24739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 716 additions and 0 deletions

78
.gitignore vendored Normal file
View File

@ -0,0 +1,78 @@
# Created by .ignore support plugin (hsz.mobi)
.eunit
deps
*.o
*.beam
*.plt
erl_crash.dump
ebin/*.beam
rel/example_project
.concrete/DEV_MODE
.rebar
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Mongo Explorer plugin:
.idea/mongoSettings.xml
*.iws
*.ipr
*.iml
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
env.list

4
.gitmodules vendored Normal file
View File

@ -0,0 +1,4 @@
[submodule "build_utils"]
path = build_utils
url = git@github.com:rbkmoney/build_utils.git
branch = master

18
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,18 @@
#!groovy
build('questionary', 'java-maven') {
checkoutRepo()
loadBuildUtils()
def javaServicePipeline
runStage('load JavaService pipeline') {
javaServicePipeline = load("build_utils/jenkins_lib/pipeJavaService.groovy")
}
def serviceName = env.REPO_NAME
def mvnArgs = '-DjvmArgs="-Xmx256m"'
def useJava11 = true
def registry = 'dr2.rbkmoney.com'
def registryCredsId = 'jenkins_harbor'
javaServicePipeline(serviceName, useJava11, mvnArgs, registry, registryCredsId)
}

1
build_utils Submodule

@ -0,0 +1 @@
Subproject commit ea4aa042f482551d624fd49a570d28488f479e93

12
docker-compose-dev.yml Normal file
View File

@ -0,0 +1,12 @@
version: '3'
services:
postgresql:
image: postgres:9.6
volumes:
- ./data:/var/lib/postgresql
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: worksheet

271
pom.xml Normal file
View File

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>com.rbkmoney</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version>
</parent>
<artifactId>questionary</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Questionary</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>11</java.version>
<server.port>8022</server.port>
<exposed.ports>${server.port}</exposed.ports>
<dockerfile.base.service.tag>bc95d0d6dc13c693acd2b274531a7d604b877bf3</dockerfile.base.service.tag>
<dockerfile.registry>${env.REGISTRY}</dockerfile.registry>
<shared.resources.version>0.3.6</shared.resources.version>
<db.port>5432</db.port>
<db.user>postgres</db.user>
<db.password>postgres</db.password>
<db.name>questionary</db.name>
<db.schema>qs</db.schema>
<db.url>jdbc:postgresql://localhost:${db.port}/${db.name}</db.url>
</properties>
<dependencies>
<!--rbkmoney-->
<dependency>
<groupId>com.rbkmoney</groupId>
<artifactId>spring-boot-starter-metrics-statsd</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>com.rbkmoney.woody</groupId>
<artifactId>woody-thrift</artifactId>
<version>1.1.15</version>
</dependency>
<dependency>
<groupId>com.rbkmoney</groupId>
<artifactId>shared-resources</artifactId>
<version>${shared.resources.version}</version>
</dependency>
<dependency>
<groupId>com.rbkmoney</groupId>
<artifactId>db-common-lib</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.rbkmoney</groupId>
<artifactId>ank-proto</artifactId>
<version>1.9-31453e7</version>
</dependency>
<!--spring-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!--third party-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq</artifactId>
<version>${jooq.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flyway.version}</version>
</dependency>
<!--test-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>${project.build.directory}/maven-shared-archive-resources</directory>
<targetPath>${project.build.directory}</targetPath>
<includes>
<include>Dockerfile</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>${project.build.directory}/maven-shared-archive-resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>Dockerfile</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.1.RELEASE</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.6.0</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-filtering</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
<configuration>
<resourceBundles>
<resourceBundle>com.rbkmoney:shared-resources:${shared.resources.version}</resourceBundle>
</resourceBundles>
<attachToMain>false</attachToMain>
<attachToTest>false</attachToTest>
</configuration>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.rbkmoney.maven.plugins</groupId>
<artifactId>pg-embedded-plugin</artifactId>
<version>1.4</version>
<configuration>
<port>${db.port}</port>
<dbName>${db.name}</dbName>
<schemas>
<schema>${db.schema}</schema>
</schemas>
</configuration>
<executions>
<execution>
<id>PG_server_start</id>
<phase>initialize</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>PG_server_stop</id>
<phase>compile</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>${flyway.version}</version>
<configuration>
<url>${db.url}</url>
<user>${db.user}</user>
<password>${db.password}</password>
<schemas>
<schema>${db.schema}</schema>
</schemas>
</configuration>
<executions>
<execution>
<id>migrate</id>
<phase>initialize</phase>
<goals>
<goal>migrate</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>${jooq.version}</version>
<configuration>
<jdbc>
<driver>org.postgresql.Driver</driver>
<url>${db.url}</url>
<user>${db.user}</user>
<password>${db.password}</password>
</jdbc>
<generator>
<generate>
<javaTimeTypes>true</javaTimeTypes>
<pojos>true</pojos>
<pojosEqualsAndHashCode>true</pojosEqualsAndHashCode>
<pojosToString>true</pojosToString>
</generate>
<database>
<name>org.jooq.meta.postgres.PostgresDatabase</name>
<includes>.*</includes>
<excludes>schema_version|.*func|get_adjustment.*|get_cashflow.*|get_payment.*|get_payout.*|get_refund.*</excludes>
<inputSchema>${db.schema}</inputSchema>
</database>
<target>
<packageName>com.rbkmoney.questionary.domain</packageName>
<directory>src/main/java/</directory>
</target>
</generator>
</configuration>
<executions>
<execution>
<id>gen-src</id>
<phase>initialize</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,15 @@
package com.rbkmoney.questionary;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
@ServletComponentScan
@SpringBootApplication
public class QuestionaryApplication extends SpringApplication {
public static void main(String[] args) {
SpringApplication.run(QuestionaryApplication.class, args);
}
}

View File

@ -0,0 +1,19 @@
server:
port: @server.port@
management:
security:
flag: false
metrics:
export:
statsd:
flavor: etsy
enabled: false
spring:
application:
name: @project.name@
output:
ansi:
enabled: always
info:
version: @project.version@
stage: dev

View File

@ -0,0 +1,272 @@
CREATE SCHEMA IF NOT EXISTS qs;
CREATE TYPE qs.questionary_entity_type AS ENUM ('legal', 'individual');
CREATE TABLE qs.questionary
(
id BIGSERIAL NOT NULL,
owner_id BIGINT NOT NULL,
type qs.questionary_entity_type NOT NULL,
inn CHARACTER VARYING,
phone_number CHARACTER VARYING NOT NULL,
email CHARACTER VARYING NOT NULL,
site CHARACTER VARYING NOT NULL,
reg_date TIMESTAMP WITHOUT TIME ZONE NOT NULL,
reg_place CHARACTER VARYING NOT NULL,
okvd CHARACTER VARYING NOT NULL,
activity_type CHARACTER VARYING NOT NULL,
property_info CHARACTER VARYING NOT NULL,
tax_resident BOOLEAN NOT NULL DEFAULT FALSE,
CONSTRAINT questionary_pkey PRIMARY KEY (id)
);
CREATE INDEX questionary_owner_id on qs.questionary (owner_id);
CREATE TABLE qs.individual_entity_questionary
(
id BIGSERIAL NOT NULL,
residence_name CHARACTER VARYING,
residence_series CHARACTER VARYING,
residence_number CHARACTER VARYING,
residence_beginning_date TIMESTAMP WITHOUT TIME ZONE,
residence_expiration_date TIMESTAMP WITHOUT TIME ZONE,
ogrnip CHARACTER VARYING NOT NULL,
foreign_public_person BOOLEAN NOT NULL DEFAULT FALSE,
foreign_relative_person BOOLEAN NOT NULL DEFAULT FALSE,
behalf_of_foreign BOOLEAN NOT NULL DEFAULT FALSE,
worldwide_org_public_person BOOLEAN NOT NULL DEFAULT FALSE,
has_representative BOOLEAN NOT NULL DEFAULT FALSE,
beneficial_owner BOOLEAN NOT NULL DEFAULT FALSE,
CONSTRAINT fk_individual_entity_to_questionary FOREIGN KEY (id) REFERENCES qs.questionary (id)
);
CREATE TABLE qs.legal_entity_questionary
(
id BIGSERIAL NOT NULL,
name CHARACTER VARYING NOT NULL,
foreign_name CHARACTER VARYING,
legal_form CHARACTER VARYING NOT NULL,
ogrn CHARACTER VARYING NOT NULL,
reg_address CHARACTER VARYING NOT NULL,
reg_actual_address CHARACTER VARYING,
additional_space CHARACTER VARYING NOT NULL,
okato_code CHARACTER VARYING,
okpo_code CHARACTER VARYING,
postal_address CHARACTER VARYING NOT NULL,
owner_resident BOOLEAN NOT NULL DEFAULT FALSE,
fatca BOOLEAN NOT NULL DEFAULT FALSE,
CONSTRAINT fk_legal_entity_to_questionary FOREIGN KEY (id) REFERENCES qs.questionary (id)
);
CREATE TABLE qs.license_info
(
id BIGSERIAL NOT NULL,
questionary_id BIGINT NOT NULL,
type CHARACTER VARYING NOT NULL,
number CHARACTER VARYING NOT NULL,
issue_date TIMESTAMP WITHOUT TIME ZONE NOT NULL,
issuer CHARACTER VARYING NOT NULL,
validity TIMESTAMP WITHOUT TIME ZONE NOT NULL,
CONSTRAINT license_info_pkey PRIMARY KEY (id),
CONSTRAINT fk_license_info_to_questionary_data FOREIGN KEY (questionary_id) REFERENCES qs.questionary (id)
);
CREATE UNIQUE INDEX license_info_to_q_data_id ON qs.license_info (questionary_id);
CREATE TYPE qs.month_operation_count AS ENUM ('lt_ten', 'btw_ten_to_fifty', 'gt_fifty');
CREATE TYPE qs.month_operation_sum AS ENUM ('lt_five_hundred_thousand', 'btw_five_hundred_thousand_to_one_million', 'gt_one_million');
CREATE TYPE qs.relation_process AS ENUM ('insolvency_proceedings', 'bankrupt_judicial_decision', 'liquidation_process');
CREATE TYPE qs.business_reputation AS ENUM ('provide_reviews', 'no_reviews');
CREATE TABLE qs.additional_info
(
id BIGSERIAL NOT NULL,
questionary_id BIGINT NOT NULL,
staff_count BOOLEAN NOT NULL DEFAULT FALSE,
accounting CHARACTER VARYING,
accounting_org CHARACTER VARYING,
nko_relation_target CHARACTER VARYING NOT NULL,
relationship_with_nko CHARACTER VARYING NOT NULL,
month_operation_count qs.month_operation_count NOT NULL,
month_operation_sum qs.month_operation_sum NOT NULL,
storage_facilities BOOLEAN NOT NULL DEFAULT FALSE NOT NULL,
counterparties CHARACTER VARYING NOT NULL,
relation_process qs.relation_process NOT NULL,
benefit_third_parties BOOLEAN NOT NULL DEFAULT FALSE NOT NULL,
business_reputation qs.business_reputation NOT NULL,
bank_details CHARACTER VARYING NOT NULL,
CONSTRAINT additional_info_pkey PRIMARY KEY (id),
CONSTRAINT fk_additional_info_to_questionary_data FOREIGN KEY (questionary_id) REFERENCES qs.questionary (id)
);
CREATE INDEX additional_info_to_questionary_id ON qs.additional_info (questionary_id);
CREATE TABLE qs.financial_position
(
id BIGSERIAL NOT NULL,
additional_info_id BIGINT NOT NULL,
description CHARACTER VARYING NOT NULL,
CONSTRAINT financial_position_pkey PRIMARY KEY (id),
CONSTRAINT fk_financial_position_to_additional_info FOREIGN KEY (additional_info_id) REFERENCES qs.additional_info (id)
);
CREATE INDEX financial_position_additional_info_id ON qs.financial_position (additional_info_id);
CREATE TABLE qs.business_info
(
id BIGSERIAL NOT NULL,
additional_info_id BIGINT NOT NULL,
description CHARACTER VARYING NOT NULL,
CONSTRAINT business_info_pkey PRIMARY KEY (id),
CONSTRAINT fk_business_info_to_additional_info FOREIGN KEY (additional_info_id) REFERENCES qs.additional_info (id)
);
CREATE INDEX business_info_additional_info_id ON qs.business_info (additional_info_id);
CREATE TABLE qs.license_activity
(
id BIGSERIAL NOT NULL,
license_info_id BIGINT NOT NULL,
name CHARACTER VARYING NOT NULL,
CONSTRAINT license_activity_pkey PRIMARY KEY (id),
CONSTRAINT fk_license_activities_to_license_info FOREIGN KEY (license_info_id) REFERENCES qs.license_info (id)
);
CREATE INDEX license_activities_q_data_id ON qs.license_activity (license_info_id);
CREATE TABLE qs.legal_org_info
(
id BIGSERIAL NOT NULL,
questionary_id BIGINT NOT NULL,
description CHARACTER VARYING NOT NULL,
CONSTRAINT legal_org_info_pkey PRIMARY KEY (id),
CONSTRAINT fk_legal_org_info_to_questionary FOREIGN KEY (questionary_id) REFERENCES qs.questionary (id)
);
CREATE TABLE qs.russian_private_entity
(
id BIGSERIAL NOT NULL,
questionary_id BIGINT NOT NULL,
first_name CHARACTER VARYING NOT NULL,
second_name CHARACTER VARYING NOT NULL,
middle_name CHARACTER VARYING NOT NULL,
birth_date TIMESTAMP WITHOUT TIME ZONE NOT NULL,
citizenship CHARACTER VARYING NOT NULL,
residence_address CHARACTER VARYING NOT NULL,
actual_address CHARACTER VARYING,
contact_info CHARACTER VARYING,
CONSTRAINT russian_private_entity_pkey PRIMARY KEY (id),
CONSTRAINT fk_russian_private_entity_to_questionary FOREIGN KEY (questionary_id) REFERENCES qs.questionary (id)
);
CREATE INDEX russian_private_entity_questionary_id ON qs.russian_private_entity (questionary_id);
CREATE TABLE qs.identity_document
(
id BIGSERIAL NOT NULL,
questionary_id BIGINT NOT NULL,
name BIGSERIAL NOT NULL,
CONSTRAINT identity_document_pkey PRIMARY KEY (id),
CONSTRAINT fk_identity_doc_questionary FOREIGN KEY (questionary_id) REFERENCES qs.questionary (id)
);
CREATE INDEX identity_document_questionary_id ON qs.identity_document (questionary_id);
CREATE TABLE qs.russian_passport
(
id BIGSERIAL NOT NULL,
serial CHARACTER VARYING,
number CHARACTER VARYING NOT NULL,
issuer CHARACTER VARYING NOT NULL,
issuer_code CHARACTER VARYING,
issued_at TIMESTAMP WITHOUT TIME ZONE NOT NULL,
CONSTRAINT fk_russian_passport_to_identity_document FOREIGN KEY (id) REFERENCES qs.identity_document (id)
);
CREATE TABLE qs.migration_card
(
id BIGSERIAL NOT NULL,
questionary_id BIGINT NOT NULL,
card_number CHARACTER VARYING NOT NULL,
beginning_date TIMESTAMP WITHOUT TIME ZONE NOT NULL,
expiration_date TIMESTAMP WITHOUT TIME ZONE,
CONSTRAINT migration_card_pkey PRIMARY KEY (id),
CONSTRAINT fk_migration_card_to_questionary_data FOREIGN KEY (questionary_id) REFERENCES qs.questionary (id)
);
CREATE INDEX migration_card_questionary_id ON qs.migration_card (questionary_id);
CREATE TABLE qs.residence_approve
(
id BIGSERIAL NOT NULL,
questionary_id BIGINT NOT NULL,
name CHARACTER VARYING NOT NULL,
series CHARACTER VARYING,
number CHARACTER VARYING NOT NULL,
beginning_date TIMESTAMP WITHOUT TIME ZONE NOT NULL,
expiration_date TIMESTAMP WITHOUT TIME ZONE NOT NULL,
CONSTRAINT residence_approve_pkey PRIMARY KEY (id),
CONSTRAINT fk_residence_approve_to_questionary FOREIGN KEY (questionary_id) REFERENCES qs.questionary (id)
);
CREATE INDEX residence_approve_questionary_id ON qs.residence_approve (questionary_id);
CREATE TABLE qs.legal_owner
(
id BIGSERIAL NOT NULL,
questionary_id BIGINT NOT NULL,
private_entity_id BIGINT NOT NULL,
identity_document_id BIGINT NOT NULL,
migration_card_id BIGINT,
residence_approve_id BIGINT,
inn CHARACTER VARYING,
pdl_category BOOLEAN NOT NULL,
CONSTRAINT legal_approve_pkey PRIMARY KEY (id),
CONSTRAINT fk_legal_owner_to_questionary_data FOREIGN KEY (questionary_id) REFERENCES qs.questionary (id),
CONSTRAINT fk_legal_owner_to_private_entity FOREIGN KEY (private_entity_id) REFERENCES qs.russian_private_entity (id),
CONSTRAINT fk_legal_owner_to_identity_doc FOREIGN KEY (identity_document_id) REFERENCES qs.identity_document (id),
CONSTRAINT fk_legal_owner_to_migration_card FOREIGN KEY (migration_card_id) REFERENCES qs.migration_card (id),
CONSTRAINT fk_legal_owner_to_residence_approve FOREIGN KEY (residence_approve_id) REFERENCES qs.residence_approve (id)
);
CREATE UNIQUE INDEX legal_owner_questionary_id ON qs.legal_owner (questionary_id);
CREATE TABLE qs.beneficial_owner
(
id BIGSERIAL NOT NULL,
questionary_id BIGINT NOT NULL,
private_entity_id BIGINT NOT NULL,
identity_document_id BIGINT NOT NULL,
migration_card_id BIGINT,
residence_approve_id BIGINT,
ownership_percentage SMALLINT NOT NULL,
inn CHARACTER VARYING,
pdl_category BOOLEAN NOT NULL,
CONSTRAINT beneficial_owner_pkey PRIMARY KEY (id),
CONSTRAINT fk_beneficial_owner_to_questionary_data FOREIGN KEY (questionary_id) REFERENCES qs.questionary (id),
CONSTRAINT fk_beneficial_owner_to_private_entity FOREIGN KEY (private_entity_id) REFERENCES qs.russian_private_entity (id),
CONSTRAINT fk_beneficial_owner_to_identity_doc FOREIGN KEY (identity_document_id) REFERENCES qs.identity_document (id),
CONSTRAINT fk_beneficial_owner_to_migration_card FOREIGN KEY (migration_card_id) REFERENCES qs.migration_card (id),
CONSTRAINT fk_beneficial_owner_to_residence_approve FOREIGN KEY (residence_approve_id) REFERENCES qs.residence_approve (id)
);
CREATE INDEX beneficial_owner_questionary_id ON qs.beneficial_owner (questionary_id)

View File

@ -0,0 +1,16 @@
package com.rbkmoney.questionary;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = QuestionaryApplication.class)
public class QuestionaryApplicationTest {
@Test
public void contextLoads() {
}
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<root level="warn">
<appender-ref ref="CONSOLE"/>
</root>
<logger name="com.rbkmoney.woody" level="ALL"/>
</configuration>