Note that there are some explanatory texts on larger screens.

plurals
  1. POFlyway with multiple databases connections
    text
    copied!<p>I'm trying to use flyway on a complex ERP with multiple databases, but I didn't find any hint to make it runs. I'm using an ant script together with Hudson to build the whole system. So, I created a migrate.xml file with the contents below and call the script multiple times at tasks the below. However, the task runs with any errors only once. If I call the task twice, an exception is thrown. Any idea to solve the problem?</p> <p>Thanks in advance.</p> <pre><code>--exception BUILD FAILED /home/raphael/Development/ufpb/sig/sig-migration-fly-way/build.xml:6: The following error occurred while executing this line: /home/raphael/Development/ufpb/sig/sig-migration-fly-way/migrate.xml:27: Flyway Error: java.lang.IllegalArgumentException: null source at java.util.EventObject.&lt;init&gt;(EventObject.java:38) at org.apache.tools.ant.BuildEvent.&lt;init&gt;(BuildEvent.java:93) at org.apache.tools.ant.Project.fireMessageLogged(Project.java:2351) at org.apache.tools.ant.Project.log(Project.java:492) at com.googlecode.flyway.ant.AntLog.debug(AntLog.java:42) at com.googlecode.flyway.core.dbsupport.DbSupportFactory.createDbSupport(DbSupportFactory.java:59) at com.googlecode.flyway.core.Flyway.execute(Flyway.java:1159) at com.googlecode.flyway.core.Flyway.info(Flyway.java:967) at com.googlecode.flyway.ant.MigrateTask.doExecuteWithMigrationConfig(MigrateTask.java:157) at com.googlecode.flyway.ant.AbstractMigrationLoadingTask.doExecute(AbstractMigrationLoadingTask.java:271) at com.googlecode.flyway.ant.AbstractFlywayTask.execute(AbstractFlywayTask.java:329) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) --task &lt;target name="test"&gt; &lt;ant antfile="migrate.xml"&gt; &lt;property name="dir" value="sigaa"/&gt; &lt;property name="database" value="demo_development"/&gt; &lt;/ant&gt; &lt;/target&gt; ---migrate.xml &lt;?xml version="1.0"?&gt; &lt;project name="migrations" default="deploy" basedir="." xmlns:flyway="antlib:com.googlecode.flyway.ant"&gt; &lt;path id="flyway.classpath"&gt; &lt;!-- include all jars containing jdbc drivers --&gt; &lt;!-- include all jars and directories containing sql migrations --&gt; &lt;!-- include all jars and directories containing compiled java migrations --&gt; &lt;fileset dir="lib"&gt; &lt;include name="*.jar" /&gt; &lt;/fileset&gt; &lt;/path&gt; &lt;taskdef uri="antlib:com.googlecode.flyway.ant" resource="com/googlecode/flyway/ant/antlib.xml" /&gt; &lt;property name="flyway.driver" value="org.postgresql.Driver"/&gt; &lt;property name="flyway.initOnMigrate" value="true"/&gt; &lt;property name="flyway.validateOnMigrate" value="true"/&gt; &lt;property name="flyway.url" value="jdbc:postgresql://localhost:5432/${database}"/&gt; &lt;property name="flyway.user" value="***"/&gt; &lt;property name="flyway.password" value="****"/&gt; &lt;property name="flyway.table" value="schema_version_${dir}"/&gt; &lt;property name="flyway.locations" value="filesystem:db/migrations/${dir}"/&gt; &lt;target name="migrate"&gt; &lt;flyway:migrate /&gt; &lt;/target&gt; &lt;target name="deploy" depends="migrate"&gt; &lt;flyway:info /&gt; &lt;/target&gt; &lt;/project&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload