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

Feature/p2022 1324 #18

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Integrate flyway into Patronage22EganortapApplication
  • Loading branch information
Pawel-Koz committed Mar 2, 2022
commit f2248d639becbcebc4ddeba52e8398e6363f0403
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.intive.patronage22eganortap;

import org.flywaydb.core.Flyway;
Pawel-Koz marked this conversation as resolved.
Show resolved Hide resolved
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

Expand All @@ -8,6 +9,8 @@ public class Patronage22EganortapApplication {

public static void main(String[] args) {
SpringApplication.run(Patronage22EganortapApplication.class, args);
Flyway flyway = Flyway.configure().dataSource("jdbc:h2:mem:pawelDB", "sa", null).load();
flyway.migrate();
}

}
5 changes: 5 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
spring.h2.console.enabled=true
Pawel-Koz marked this conversation as resolved.
Show resolved Hide resolved
spring.datasource.url=jdbc:h2:mem:pawelDB
spring.datasource.driverClassName=org.h2.Driver
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

#spring.flyway.url=jdbc:h2:mem:pawelDB
#spring.flyway.locations=classpath:db:migration
#spring.flyway.user=sa
#spring.flyway.password=