Skip to content

Commit

Permalink
fixed missing attributes of postgres for latest updates (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariodavid authored Jul 21, 2018
1 parent 38f418f commit c180f2b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.5.3] - 21/07/2018

### Changed
- Fixed missing attributes PostgreSQL init db scripts

## [0.5.2] - 03/07/2018

### Changed
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.cubaVersion = '6.9.0'
ext.cubaVersion = '6.9.3'
repositories {

maven {
Expand Down Expand Up @@ -46,7 +46,7 @@ apply(plugin: 'cuba')
cuba {
artifact {
group = 'de.diedavids.cuba.dataimport'
version = "0.5.2"
version = "0.5.3"
isSnapshot = false
}
tomcat {
Expand Down
3 changes: 3 additions & 0 deletions modules/core/db/init/postgres/10.create-db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ create table DDCDI_IMPORT_ATTRIBUTE_MAPPER (
DELETED_BY varchar(50),
--
CONFIGURATION_ID uuid not null,
MAPPER_MODE varchar(50) not null,
ATTRIBUTE_TYPE varchar(50),
ENTITY_ATTRIBUTE varchar(255),
ASSOCIATION_LOOKUP_ATTRIBUTE varchar(255),
FILE_COLUMN_NUMBER integer not null,
FILE_COLUMN_ALIAS varchar(255),
CUSTOM_ATTRIBUTE_BIND_SCRIPT text,
Expand Down
4 changes: 2 additions & 2 deletions modules/core/db/init/postgres/20.create-db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ alter table DDCDI_IMPORT_CONFIGURATION add constraint FK_DDCDI_IMPORT_CONFIGURAT
create index IDX_DDCDI_IMPORT_CONFIGURATION_TEMPLATE on DDCDI_IMPORT_CONFIGURATION (TEMPLATE_ID)^
-- end DDCDI_IMPORT_CONFIGURATION
-- begin DDCDI_IMPORT_ATTRIBUTE_MAPPER
alter table DDCDI_IMPORT_ATTRIBUTE_MAPPER add constraint FK_DDCDI_IMPORT_ATTRIBUTE_MAPPER_CONFIGURATION foreign key (CONFIGURATION_ID) references DDCDI_IMPORT_CONFIGURATION(ID)^
create index IDX_DDCDI_IMPORT_ATTRIBUTE_MAPPER_CONFIGURATION on DDCDI_IMPORT_ATTRIBUTE_MAPPER (CONFIGURATION_ID)^
alter table DDCDI_IMPORT_ATTRIBUTE_MAPPER add constraint FK_DDCDI_IMPORT_ATTRIBUTE_MAPPER_ON_CONFIGURATION foreign key (CONFIGURATION_ID) references DDCDI_IMPORT_CONFIGURATION(ID)^
create index IDX_DDCDI_IMPORT_ATTRIBUTE_MAPPER_ON_CONFIGURATION on DDCDI_IMPORT_ATTRIBUTE_MAPPER (CONFIGURATION_ID)^
-- end DDCDI_IMPORT_ATTRIBUTE_MAPPER
-- begin DDCDI_UNIQUE_CONFIGURATION_ATTRIBUTE
alter table DDCDI_UNIQUE_CONFIGURATION_ATTRIBUTE add constraint FK_DDCDI_UNIQUE_CONFIGURATION_ATTRIBUTE_UNIQUE_CONFIGURATION foreign key (UNIQUE_CONFIGURATION_ID) references DDCDI_UNIQUE_CONFIGURATION(ID)^
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
alter table DDCDI_IMPORT_ATTRIBUTE_MAPPER add column MAPPER_MODE varchar(50) ^
update DDCDI_IMPORT_ATTRIBUTE_MAPPER set MAPPER_MODE = 'AUTOMATIC' where MAPPER_MODE is null ;
alter table DDCDI_IMPORT_ATTRIBUTE_MAPPER alter column MAPPER_MODE set not null ;
alter table DDCDI_IMPORT_ATTRIBUTE_MAPPER add column ATTRIBUTE_TYPE varchar(50) ;
alter table DDCDI_IMPORT_ATTRIBUTE_MAPPER add column ASSOCIATION_LOOKUP_ATTRIBUTE varchar(255) ;
16 changes: 8 additions & 8 deletions modules/core/web/META-INF/context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
type="javax.sql.DataSource"
url="jdbc:oracle:thin:@//localhost/xe"
username="system"/>-->
<!--<Resource driverClassName="org.postgresql.Driver"
<!--<Resource driverClassName="com.mysql.jdbc.Driver"
maxIdle="2"
maxTotal="20"
maxWaitMillis="5000"
name="jdbc/CubaDS"
password="postgres"
password="mysql"
type="javax.sql.DataSource"
url="jdbc:postgresql://localhost/postgres"
username="postgres"/>-->
<!--<Resource driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/cuba?useSSL=false&amp;allowMultiQueries=true"
username="root"/>-->
<!--<Resource driverClassName="org.postgresql.Driver"
maxIdle="2"
maxTotal="20"
maxWaitMillis="5000"
name="jdbc/CubaDS"
password="mysql"
password="postgres"
type="javax.sql.DataSource"
url="jdbc:mysql://localhost/cuba?useSSL=false&amp;allowMultiQueries=true"
username="root"/>-->
url="jdbc:postgresql://localhost/dataimport"
username="postgres"/>-->
</Context>

0 comments on commit c180f2b

Please sign in to comment.