- Where Developers Learn, Share, & Build Careers


I'm trying to set up my application so it will automatically upgrade the database, when any environment Will be posted in the following for Spring Config:

  & lt; Bean id = "datasource" class = "org.apache.commons.dbcp.basicDataSource" & gt; & Lt; Property Name = "driverClassName" value = "oracle.jdbc.driver.OracleDriver" /> & Lt; Property name = "url" value = "jdbc: oracle: thin: $ $ {db.host}: $ {db.port}: $ {db.database}" / & gt; & Lt; Property name = "user name" value = "$ {db.username}" /> & Lt; Property name = "password" value = "$ {db.password}" /> & Lt; Property Name = "Maxactive" value = "4" /> & Lt; Property Name = "MaxWhite" value = "5000" /> & Lt; Property Name = "Default Auto Comet" value = "False" /> & Lt; Property Name = "defaultReadOnly" value = "false" /> & Lt; Property Name = "Verification" value = "Select from 1" DUAL "/> & Lt; / Bean & gt; & Lt ;! - Added an intro to solve the problem - & gt; & Lt; Bean id = "Flyway-Init" class = "com.googlecode.flyway.core.Flyway" init-method = "init" & gt; & Lt; Property Name = "Data Source" Riff = "Data Sources" / & gt; & Lt; / Bean & gt; & Lt; Bean id = "flyaway" class = "com.googlecode.flyway.core.flyway" init-method = "migrate" dependent = "flyway-init" & gt; & Lt; Property Name = "Data Source" Reference = "Data Sources" / & gt; & Lt; / Bean & gt;   

But when I run it in jeans, I get the following error:

com.googlecode.flyway.core.validation.ValidationException: Empty schema 'WMYERS' without metadata table! Use Init () to initialize the metadata table.

I have already moved the flyway against the database, so it is already set up and ready to go and the SCHEMA_HISTORY table is present, any idea?

Flyway default checks that the empty schema has been started properly, this check ensures that the fly configuration In case of mistake, the wrong DB does not migrate or scrub. The migration failed and this exception was thrown because the defined name metadata table should be present and when there is some data in your DB schema, it should not be empty. Perhaps the metadata table was modified manually.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -