Skip to content

Commit

Permalink
First homolog
Browse files Browse the repository at this point in the history
  • Loading branch information
CaioCesarRocha committed May 6, 2021
1 parent 23c45be commit 7a1fffe
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
6 changes: 6 additions & 0 deletions backend/create.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
create table tb_sales (id int8 generated by default as identity, amount float8, date date, deals int4, visited int4, seller_id int8, primary key (id));
create table tb_sellers (id int8 generated by default as identity, name varchar(255), primary key (id));
alter table if exists tb_sales add constraint FKp0nn0oixeiw2fq3jivj6vnsu foreign key (seller_id) references tb_sellers;
create table tb_sales (id int8 generated by default as identity, amount float8, date date, deals int4, visited int4, seller_id int8, primary key (id));
create table tb_sellers (id int8 generated by default as identity, name varchar(255), primary key (id));
alter table if exists tb_sales add constraint FKp0nn0oixeiw2fq3jivj6vnsu foreign key (seller_id) references tb_sellers;
11 changes: 11 additions & 0 deletions backend/src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#spring.jpa.properties.javax.persistence.schema-generation.create-source=metadata
#spring.jpa.properties.javax.persistence.schema-generation.scripts.action=create
#spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=create.sql
#spring.jpa.properties.hibernate.hbm2ddl.delimiter=;

spring.datasource.url=jdbc:postgresql://localhost:5432/dsvendas
spring.datasource.username=postgres
spring.datasource.password=root

spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.hibernate.ddl-auto=none
1 change: 1 addition & 0 deletions backend/src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
spring.datasource.url=${DATABASE_URL}
5 changes: 3 additions & 2 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
spring.jpa.open-in-view=false
spring.profiles.active=test
spring.profiles.active=${APP_PROFILE:test}

spring.jpa.open-in-view=false
1 change: 1 addition & 0 deletions backend/system.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java.runtime.version=11

0 comments on commit 7a1fffe

Please sign in to comment.