Skip to content

Commit

Permalink
fix: PPI-10 - correções nos migrations de teste e local
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderleik committed Jul 10, 2024
1 parent fb1634d commit 8ab6375
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ spring:

config:
import: optional:file:.env[.*]

flyway:
enabled: true
locations: classpath:db/migration
out-of-order: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE tbproduct (
CREATE TABLE IF NOT EXISTS tbproduct (
idproduct UUID PRIMARY KEY DEFAULT gen_random_uuid(),
productname VARCHAR(60) NOT NULL,
price NUMERIC(19,2) NOT NULL CHECK (price > 0),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE tborder (
CREATE TABLE IF NOT EXISTS tborder (
idorder UUID PRIMARY KEY DEFAULT gen_random_uuid(),
orderdate DATE NOT NULL,
status VARCHAR(255) NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE tborderitem (
CREATE TABLE IF NOT EXISTS tborderitem (
idorderitem UUID PRIMARY KEY DEFAULT gen_random_uuid(),
orderid UUID NOT NULL,
productid UUID NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
spring:

datasource:
url: jdbc:h2:mem:testdb
driver-class-name: org.h2.Driver
Expand All @@ -18,4 +17,5 @@ spring:
path: /h2-console

flyway:
locations: classpath:db/migration/test
locations: classpath:db/migration/test
out-of-order: true

0 comments on commit 8ab6375

Please sign in to comment.