diff --git a/src/main/resources/db/migration/dev/V20250202156__Drop_Notification_Enabled_Column_From_Member.sql b/src/main/resources/db/migration/dev/V20250202156__Drop_Notification_Enabled_Column_From_Member.sql new file mode 100644 index 00000000..d868643e --- /dev/null +++ b/src/main/resources/db/migration/dev/V20250202156__Drop_Notification_Enabled_Column_From_Member.sql @@ -0,0 +1,3 @@ +ALTER TABLE member +DROP +COLUMN notification_enabled; \ No newline at end of file diff --git a/src/main/resources/mysql.yml b/src/main/resources/mysql.yml index e2b7a114..f4679a83 100644 --- a/src/main/resources/mysql.yml +++ b/src/main/resources/mysql.yml @@ -21,15 +21,15 @@ spring.config.activate.on-profile: local spring: flyway: - enabled: false + enabled: true baseline-on-migrate: true - locations: classpath:db/migration + locations: classpath:db/migration/dev jpa: database: MySQL open-in-view: false generate-ddl: false hibernate: - ddl-auto: update + ddl-auto: none show-sql: true properties: hibernate: @@ -56,14 +56,14 @@ spring: open-in-view: false generate-ddl: false hibernate: - ddl-auto: update + ddl-auto: validate show-sql: true properties: hibernate: dialect: org.hibernate.dialect.MySQLDialect flyway: - enabled: false + enabled: true baseline-on-migrate: true locations: classpath:db/migration/dev diff --git a/src/test/java/clap/server/TaskflowApplicationTests.java b/src/test/java/clap/server/TaskflowApplicationTests.java index 65422b39..12511b46 100644 --- a/src/test/java/clap/server/TaskflowApplicationTests.java +++ b/src/test/java/clap/server/TaskflowApplicationTests.java @@ -7,6 +7,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.DynamicPropertyRegistry; import org.springframework.test.context.DynamicPropertySource; +import org.springframework.test.context.TestPropertySource; import org.testcontainers.elasticsearch.ElasticsearchContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; @@ -14,9 +15,9 @@ import static org.assertj.core.api.Assertions.assertThat; -//@DataElasticsearchTest @Testcontainers @SpringBootTest +@TestPropertySource(properties = "spring.flyway.enabled=false") class TaskflowApplicationTests { @Autowired diff --git a/src/test/java/clap/server/application/service/admin/AddCategoryServiceTest.java b/src/test/java/clap/server/application/service/admin/AddCategoryServiceTest.java index f3cf4259..83e7fb18 100644 --- a/src/test/java/clap/server/application/service/admin/AddCategoryServiceTest.java +++ b/src/test/java/clap/server/application/service/admin/AddCategoryServiceTest.java @@ -12,6 +12,7 @@ import org.springframework.test.annotation.Rollback; import org.springframework.test.context.DynamicPropertyRegistry; import org.springframework.test.context.DynamicPropertySource; +import org.springframework.test.context.TestPropertySource; import org.testcontainers.elasticsearch.ElasticsearchContainer; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; @@ -21,6 +22,7 @@ @SpringBootTest @Testcontainers @Transactional +@TestPropertySource(properties = "spring.flyway.enabled=false") class AddCategoryServiceTest { @Container diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml index 470fc61a..015a4da0 100644 --- a/src/test/resources/application.yml +++ b/src/test/resources/application.yml @@ -7,12 +7,14 @@ spring: # Database 설정 정보 (H2 연동 정보) datasource: driver-class-name: org.h2.Driver # H2 Database 사용 - url: jdbc:h2:mem:testdb # H2 접속 정보 + url: jdbc:h2:mem:testdb;DATABASE_TO_UPPER=false # H2 접속 정보 username: taskflow # H2 접속 시 입력할 username 정보 password: # H2 접속 시 입력할 password 정보 jpa: hibernate: ddl-auto: create + flyway: + enabled: false mail: host: smtp.gmail.com