Skip to content

Commit

Permalink
fix(flyway): add FlywayBeanConfig to fix migration error
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaerim1001 committed Sep 26, 2023
1 parent 89e1468 commit 48844f6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/com/e2i/wemeet/config/flyway/FlywayConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.e2i.wemeet.config.flyway;

import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FlywayConfig {

@Bean
public FlywayMigrationStrategy cleanMigrateStrategy() {
return flyway -> {
flyway.repair();
flyway.migrate();
};
}
}

0 comments on commit 48844f6

Please sign in to comment.