Skip to content
Permalink
Browse files
Changed BIGINT to BIGSERIAL
  • Loading branch information
ebenezergraham committed Jul 15, 2019
1 parent 5964cde commit 540902e3dbac8b52b0bc08d44bc45a5b70fdbbb1
Showing 3 changed files with 16 additions and 16 deletions.
@@ -17,18 +17,18 @@
-- under the License.
--

CREATE TABLE IF NOT EXISTS horus_offices ( id BIGINT NOT NULL, parent_office_id BIGINT NULL, identifier VARCHAR(32) NOT NULL,a_name VARCHAR(256) NOT NULL, description VARCHAR(2048) NULL, created_by VARCHAR(32) NOT NULL, created_on TIMESTAMP(3) NOT NULL, last_modified_by VARCHAR(32) NULL, last_modified_on TIMESTAMP(3) NULL,
CREATE TABLE IF NOT EXISTS horus_offices ( id BIGSERIAL, parent_office_id BIGINT NULL, identifier VARCHAR(32) NOT NULL,a_name VARCHAR(256) NOT NULL, description VARCHAR(2048) NULL, created_by VARCHAR(32) NOT NULL, created_on TIMESTAMP(3) NOT NULL, last_modified_by VARCHAR(32) NULL, last_modified_on TIMESTAMP(3) NULL,
CONSTRAINT office_pk PRIMARY KEY (id), CONSTRAINT office_identifier_uq UNIQUE (identifier),CONSTRAINT office_parent_fk FOREIGN KEY (parent_office_id) REFERENCES horus_offices (id) ON UPDATE RESTRICT );

CREATE TABLE IF NOT EXISTS horus_addresses ( id BIGINT NOT NULL, office_id BIGINT NOT NULL, street VARCHAR(256) NOT NULL, city VARCHAR(256) NOT NULL,region VARCHAR(256) NULL, postal_code VARCHAR(32) NULL, country_code VARCHAR(2) NOT NULL, country VARCHAR(256) NOT NULL,
CREATE TABLE IF NOT EXISTS horus_addresses ( id BIGSERIAL, office_id BIGINT NOT NULL, street VARCHAR(256) NOT NULL, city VARCHAR(256) NOT NULL,region VARCHAR(256) NULL, postal_code VARCHAR(32) NULL, country_code VARCHAR(2) NOT NULL, country VARCHAR(256) NOT NULL,
CONSTRAINT address_pk PRIMARY KEY (id),
CONSTRAINT address_office_fk FOREIGN KEY (office_id) REFERENCES horus_offices (id) ON UPDATE RESTRICT);

CREATE TABLE IF NOT EXISTS horus_employees ( id BIGINT NOT NULL, identifier VARCHAR(32) NOT NULL,given_name VARCHAR(256) NULL, middle_name VARCHAR(256) NULL,surname VARCHAR(256) NULL, assigned_office_id BIGINT NULL, created_by VARCHAR(32) NOT NULL,created_on TIMESTAMP(3) NOT NULL,last_modified_by VARCHAR(32) NULL,last_modified_on TIMESTAMP(3) NULL,
CREATE TABLE IF NOT EXISTS horus_employees ( id BIGSERIAL, identifier VARCHAR(32) NOT NULL,given_name VARCHAR(256) NULL, middle_name VARCHAR(256) NULL,surname VARCHAR(256) NULL, assigned_office_id BIGINT NULL, created_by VARCHAR(32) NOT NULL,created_on TIMESTAMP(3) NOT NULL,last_modified_by VARCHAR(32) NULL,last_modified_on TIMESTAMP(3) NULL,
CONSTRAINT employee_pk PRIMARY KEY (id),
CONSTRAINT employee_identifier_uq UNIQUE (identifier),
CONSTRAINT employee_office_fk FOREIGN KEY (assigned_office_id) REFERENCES horus_offices (id) ON UPDATE RESTRICT);

CREATE TABLE horus_contact_details ( id BIGINT NOT NULL, employee_id BIGINT NOT NULL, a_type VARCHAR(256) NOT NULL, a_group VARCHAR(256) NOT NULL,a_value VARCHAR(256) NOT NULL, preference_level INT NULL,
CREATE TABLE horus_contact_details ( id BIGSERIAL, employee_id BIGINT NOT NULL, a_type VARCHAR(256) NOT NULL, a_group VARCHAR(256) NOT NULL,a_value VARCHAR(256) NOT NULL, preference_level INT NULL,
CONSTRAINT contact_detail_pk PRIMARY KEY (id),
CONSTRAINT contact_detail_employee_fk FOREIGN KEY (employee_id) REFERENCES horus_employees (id) ON UPDATE RESTRICT);
CONSTRAINT contact_detail_employee_fk FOREIGN KEY (employee_id) REFERENCES horus_employees (id) ON UPDATE RESTRICT);
@@ -17,5 +17,5 @@
-- under the License.
--

CREATE TABLE IF NOT EXISTS horus_external_references ( id BIGINT NOT NULL, office_identifier VARCHAR(32) NOT NULL, a_type VARCHAR(32) NULL, a_state VARCHAR(256) NULL, CONSTRAINT external_references_pk PRIMARY KEY (id),
CREATE TABLE IF NOT EXISTS horus_external_references ( id BIGSERIAL, office_identifier VARCHAR(32) NOT NULL, a_type VARCHAR(32) NULL, a_state VARCHAR(256) NULL, CONSTRAINT external_references_pk PRIMARY KEY (id),
CONSTRAINT external_references_uq UNIQUE (office_identifier, a_type));
@@ -19,14 +19,14 @@ group 'org.apache.fineract.cn.office'
version '0.1.0-BUILD-SNAPSHOT'

ext.versions = [
frameworkapi : '0.1.0-BUILD-SNAPSHOT',
frameworklang : '0.1.0-BUILD-SNAPSHOT',
frameworkasync : '0.1.0-BUILD-SNAPSHOT',
frameworkcassandra : '0.1.0-BUILD-SNAPSHOT',
frameworkcommand : '0.1.0-BUILD-SNAPSHOT',
frameworktest: '0.1.0-BUILD-SNAPSHOT',
frameworkanubis: '0.1.0-BUILD-SNAPSHOT',
validator : '5.3.0.Final'
frameworkapi : '0.1.0-BUILD-SNAPSHOT',
frameworklang : '0.1.0-BUILD-SNAPSHOT',
frameworkasync : '0.1.0-BUILD-SNAPSHOT',
frameworkcassandra: '0.1.0-BUILD-SNAPSHOT',
frameworkcommand : '0.1.0-BUILD-SNAPSHOT',
frameworktest : '0.1.0-BUILD-SNAPSHOT',
frameworkanubis : '0.1.0-BUILD-SNAPSHOT',
validator : '5.3.0.Final',
]

apply plugin: 'java'
@@ -64,7 +64,7 @@ ext['spring-data-releasetrain.version'] = 'Gosling-SR2A'
dependencies {
compile(
[group: 'com.google.code.findbugs', name: 'jsr305'],
[group: 'org.apache.fineract.cn', name: 'postgresql', version:'0.1.0-BUILD-SNAPSHOT'],
[group: 'org.apache.fineract.cn', name: 'postgresql', version: '0.1.0-BUILD-SNAPSHOT'],
[group: 'postgresql', name: 'postgresql', version: '9.0-801.jdbc4']
)

@@ -100,4 +100,4 @@ rat {
"gradlew.bat",
"README.md"
]
}
}

0 comments on commit 540902e

Please sign in to comment.