Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flyway version 5 script 누락된 컬럼 변경 사항 추가 #245

Merged
merged 5 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
import lombok.RequiredArgsConstructor;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.Transactional;

@Configuration
@ConditionalOnProperty(name = "data.init.user.enabled", havingValue = "true")
@RequiredArgsConstructor
public class InitializationUserConfiguration implements ApplicationRunner {

Expand Down
2 changes: 2 additions & 0 deletions backend/ddang/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ data:
enabled: false
auction:
enabled: false
user:
enabled: false

image:
store:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
alter table users add oauth_id varchar(50);
alter table users add created_time datetime(6) not null;
alter table users add last_modified_time datetime(6) not null;

alter table users add constraint uq_oauth_id unique(oauth_id);
alter table users add constraint uq_name unique(name);
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class AuctionServiceTest {
.name("회원")
.profileImage("profile.png")
.reliability(4.7d)
.oauthId("12345")
.oauthId("789321")
.build();

userRepository.save(seller);
Expand Down Expand Up @@ -229,7 +229,7 @@ class AuctionServiceTest {
.name("회원")
.profileImage("profile.png")
.reliability(4.7d)
.oauthId("12345")
.oauthId("54321")
.build();

userRepository.save(seller);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import jakarta.persistence.EntityManager;
import jakarta.persistence.Table;
import jakarta.persistence.metamodel.EntityType;
import jakarta.persistence.metamodel.Metamodel;
import java.util.List;
import org.springframework.test.context.TestContext;
import org.springframework.test.context.support.AbstractTestExecutionListener;
Expand All @@ -25,8 +24,6 @@ private EntityManager findEntityManager(final TestContext testContext) {
}

private List<String> calculateTableNames(final EntityManager em) {
final Metamodel metamodel = em.getMetamodel();

return em.getMetamodel()
.getEntities()
.stream()
Expand Down