Hi all, I need to add some values (for interest type calculation) to the database for a feature I am working on. I created the corresponging updagrade and downgrade scripts, added the changes to the latestdata.sql and tried to run the tests. The test fails saying that the lookup value already exists.
I think it might be because either the latest data is populating the row, and the upgrade script is complaining or the other way round. How do we typically go about doing this? I have attached the upgrade script and the latest data. (I also updated the application version to 172 in DatabaseVersionPersistance.java Here is the error java.lang.Exception: Cannot upgrade to 172 at org.mifos.framework.persistence.LatestTest.upAndBack(LatestTest.java:156) at org.mifos.framework.persistence.LatestTest.afterLookupValues(LatestTest.java :144) Caused by: net.sourceforge.mayfly.MayflySqlException: primary key LOOKUP_ID already has a value 603 at net.sourceforge.mayfly.MayflyException.(MayflyException.java:47) at net.sourceforge.mayfly.MayflyException.(MayflyException.java:41) at net.sourceforge.mayfly.datastore.constraint.NotNullOrUnique.check(NotNullOrU nique.java:54) at net.sourceforge.mayfly.datastore.constraint.Constraints.check(Constraints.ja va:67) at net.sourceforge.mayfly.datastore.TableData.addRow(TableData.java:79) at net.sourceforge.mayfly.datastore.TableData.addRow(TableData.java:54) at net.sourceforge.mayfly.datastore.Schema.addRow(Schema.java:161) at net.sourceforge.mayfly.datastore.DataStore.addRow(DataStore.java:123) at net.sourceforge.mayfly.evaluation.command.Insert.insertOneRow(Insert.java:45 ) at net.sourceforge.mayfly.evaluation.command.Insert.update(Insert.java:35) at net.sourceforge.mayfly.evaluation.command.Command.update(Command.java:32) at net.sourceforge.mayfly.Database.executeUpdate(Database.java:119) at net.sourceforge.mayfly.MayflyConnection.executeUpdate(MayflyConnection.java: 74) at net.sourceforge.mayfly.MayflyConnection.execute(MayflyConnection.java:63) at net.sourceforge.mayfly.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:3 2) at org.mifos.framework.persistence.SqlUpgrade.execute(SqlUpgrade.java:49) at org.mifos.framework.persistence.SqlUpgrade.upgrade(SqlUpgrade.java:32) at org.mifos.framework.persistence.LatestTest.upAndBack(LatestTest.java:172) at org.mifos.framework.persistence.LatestTest.upAndBack(LatestTest.java:153) Please help. Thanks Soham ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
