Skip to content

Instantly share code, notes, and snippets.

@jensim
Last active October 3, 2019 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jensim/31f80552ecd76e9039c3d27665fbd46a to your computer and use it in GitHub Desktop.
Save jensim/31f80552ecd76e9039c3d27665fbd46a to your computer and use it in GitHub Desktop.
Run oracle18-XE and flyway

Create docker container

docker run -d -p 1521:1521 --name=oracle-xe --volume ~/docker/oracle-xe:/opt/oracle/oradata paddan66/oracle-xe

Connection string

jdbc:oracle:thin:system/Oracle18@//localhost:1521/XEPDB1

maven migrate

mvn flyway:migrate -N
#mvn flyway:clean -N
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>5.2.4</version>
<inherited>false</inherited>
<configuration>
<installedBy>test</installedBy>
<schemas>
<schema>MY_SCHEMA</schema>
</schemas>
<url>jdbc:oracle:thin:@//localhost:1521/XEPDB1</url>
<locations>
<location>filesystem:migrations</location>
</locations>
<user>system</user>
<password>Oracle18</password>
</configuration>
<dependencies>
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc10</artifactId>
<version>19.3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment