Skip to content

Commit 43114d4

Browse files
authored
[Test] Liquibase (#247)
* test #246: liquibase * test #246: stock-quantity 증량 * test #246: 운영환경 프로필 설정 * hotfix: spotless apply * hotfix: h2 liquibase disabled
1 parent b983512 commit 43114d4

58 files changed

Lines changed: 8865 additions & 77 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ out/
3636
### VS Code ###
3737
.vscode/
3838
.env
39-
39+
.DS_Store
4040
### logs ###
4141
/logs

build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,15 @@ dependencies {
8888
testAnnotationProcessor 'org.projectlombok:lombok'
8989
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
9090
implementation 'io.github.openfeign:feign-gson:11.0'
91-
91+
// Liquibase
92+
implementation 'org.liquibase:liquibase-core'
9293
// Test
9394
testImplementation 'org.springframework.boot:spring-boot-starter-test'
9495
testImplementation 'org.springframework.security:spring-security-test'
9596
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
9697
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
98+
99+
97100
}
98101

99102
test {

src/docs/asciidoc/index.adoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@ include::_deliverypolicy.adoc[]
2020
include::_payment.adoc[]
2121
include::_customer_order.adoc[]
2222
include::_owner_order.adoc[]
23-
2423
include::_product.adoc[]
25-
// include::_product.adoc[]
2624
include::_category.adoc[]
2725
include::_product_image.adoc[]
28-
2926
include::_cart.adoc[]
3027

src/main/java/com/irum/come2us/domain/ai/domain/entity/Ai.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/main/java/com/irum/come2us/domain/ai/domain/repository/AiRepository.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/main/java/com/irum/come2us/domain/member/domain/entity/Member.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,6 @@ private String validContact(String contact) {
111111
if (!PHONE_NUMBER_PATTERN.matcher(contact).matches()) {
112112
throw new CommonException(MemberErrorCode.INVALID_CONTACT);
113113
}
114-
return email;
114+
return contact;
115115
}
116116
}

src/main/java/com/irum/come2us/domain/refund/domain/entity/Refund.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ public class Refund extends BaseEntity {
3030
@Enumerated(EnumType.STRING)
3131
private RefundReason reason;
3232

33-
@Lob private String description;
33+
@Column(columnDefinition = "TEXT")
34+
private String description;
3435

3536
@Column(nullable = false)
3637
private int price;

src/main/java/com/irum/come2us/domain/store/domain/entity/Store.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private Store(
7878
this.telemarketingRegistrationNumber =
7979
validTelemarketingRegistrationNumber(telemarketingRegistrationNumber);
8080
this.member = member;
81-
this.deliveryPolicy = null;
81+
this.deliveryPolicy = deliveryPolicy; // 삭제
8282
}
8383

8484
public static Store createStore(

src/main/resources/application-local.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
spring:
22
datasource:
3-
url: jdbc:postgresql://${LOCAL_POSTGRESQL_HOST:localhost}:${LOCAL_POSTGRESQL_PORT:5432}/${LOCAL_DB_NAME:come2us}
3+
url: jdbc:postgresql://${LOCAL_POSTGRESQL_HOST:localhost}:${LOCAL_POSTGRESQL_PORT:5432}/${LOCAL_DB_NAME:come2us_monolithic}
44
username: ${LOCAL_POSTGRESQL_USERNAME:developer}
55
password: ${LOCAL_POSTGRESQL_PASSWORD:1234}
66
driver-class-name: org.postgresql.Driver
@@ -13,13 +13,17 @@ spring:
1313
hibernate.session.events.log.LOG_QUERIES_SLOWER_THAN_MS: 200
1414
default_batch_fetch_size: 100
1515
hibernate:
16-
ddl-auto: create
16+
ddl-auto: validate
1717
database-platform: org.hibernate.dialect.PostgreSQLDialect
18-
defer-datasource-initialization: false
1918
sql:
2019
init:
2120
mode: never
2221
encoding: UTF-8
22+
liquibase:
23+
enabled: true
24+
change-log: "classpath:db/changelog/db.changelog-master.yaml"
25+
parameters:
26+
searchPath: "classpath:db/changelog"
2327

2428
file:
2529
storage: local
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spring:
1313
session.events.log.LOG_QUERIES_SLOWER_THAN_MS: 200
1414
default_batch_fetch_size: 100
1515
hibernate:
16-
ddl-auto: update
16+
ddl-auto: validate
1717
database-platform: org.hibernate.dialect.PostgreSQLDialect
1818
sql:
1919
init:

0 commit comments

Comments
 (0)