[JAVA] Add / configure / execute Flyway on Eclipse

Steps to add / configure / execute Flyway to Eclipse project

This time I explained adding flyway etc. in maven project

Additional steps

Add Flyway dependency to pom.xml image.png

	<dependency>
		<groupId>org.flywaydb</groupId>
		<artifactId>flyway-core</artifactId>
	</dependency>

Connection settings

in pom.xml

Add plugins in project> build> plugins image.png

		<plugin>
			<groupId>org.flywaydb</groupId>
			<artifactId>flyway-maven-plugin</artifactId>
			<configuration>
				<user>user<user>
				<password>password</password>
				<url>jdbc:mysql://localhost:3306/databaseName?serverTimezone=UTC</url>
				<schemas>
					<schema>schemaName</schema>
				</schemas>
			</configuration>
		</plugin>

Run

Click "powershell ..." with "shift + MR" (shift + right-click) in the root folder of the project.

image.png

Run the following code after opening PowerShell

./mvnw clean flyway:migrate

image.png

Recommended Posts

Add / configure / execute Flyway on Eclipse
Run Eclipse CDT on Ubuntu
Install tomcat + eclipse on mac