com.brihaspathee.zeus.config.CleanDB Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tp-service Show documentation
Show all versions of tp-service Show documentation
Service that contains all Trading Partner Information
The newest version!
package com.brihaspathee.zeus.config;
import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
/**
* Created in Intellij IDEA
* User: Balaji Varadharajan
* Date: 20, January 2022
* Time: 10:30 AM
* Project: Zeus
* Package Name: com.zeus.config
* To change this template use File | Settings | File and Code Template
*/
@Configuration
@Profile("clean")
public class CleanDB {
@Bean
public FlywayMigrationStrategy clean(){
return flyway -> {
flyway.clean();
flyway.migrate();
};
}
}