Recover deleted association

0
Hi, I deleted an association from my domain model. One of my team members deleted that association table from sql server database. Now, when I am trying to deploy the application, it is looking for the table in the database to run DROP command. I can see the deleted association in the changelog. Is there a way to recover that deleted association in modeler or if possible that table in sql database? An error occurred while executing action 'Execute DDL commands'. -------- com.mendix.m2ee.api.AdminException: Executing DDL commands for component MyFirstComponent failed. at com.mendix.core.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:133) Caused by: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: Error (SQL State: S0007, Error Code: 3701) on executing: DROP INDEX [idx_debitcard$debitcard_shorttran_debitcard$shorttran_debitcard$debitcard] ON [debitcard$debitcard_shorttran] All changes are rolled back. at com.mendix.connectionbus.modelsynchronization.DDLCommandExecutor.execute(DDLCommandExecutor.java:90) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot drop the index 'debitcard$debitcard_shorttran.idx_debitcard$debitcard_shorttran_debitcard$shorttran_debitcard$debitcard', because it does not exist or you do not have permission. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515) at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:792) at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:689) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155) at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:662) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at com.mendix.connectionbus.modelsynchronization.DDLCommandExecutor.executeDDLCommands(DDLCommandExecutor.java:139) at com.mendix.connectionbus.modelsynchronization.DDLCommandExecutor.execute(DDLCommandExecutor.java:47) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.synchronizeModel(SynchronizationManager.scala:138) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.executeImpl(SynchronizationManager.scala:129) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.execute(SynchronizationManager.scala:79) at com.mendix.connectionbus.ConnectionBusImpl.executeDDLCommands(ConnectionBusImpl.java:324) at com.mendix.core.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:130) at com.mendix.core.impl.MxRuntimeImpl.executeDDLCommands(MxRuntimeImpl.java:850) at com.mendix.core.action.admin.ExecuteDDLCommandsAction.call(ExecuteDDLCommandsAction.java:27) at com.mendix.core.action.admin.RuntimeAdminAction$1.execute(RuntimeAdminAction.java:23) at com.mendix.core.action.admin.RuntimeAdminAction$1.execute(RuntimeAdminAction.java:20) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.util.classloading.Runner$1.run(Runner.java:21) at java.security.AccessController.doPrivileged(Native Method) at com.mendix.util.classloading.Runner.runUsingClassLoaderOf(Runner.java:17) at com.mendix.core.action.admin.RuntimeAdminAction.execute(RuntimeAdminAction.java:25) at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:122) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:647) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Unknown Source) I tried replacing the .mda file with a previous one, but that didn't help.
asked
2 answers
2

You can try to reverse merge changes through the menu Team > reverse merge changes..

only downside is that everything in that commit will be reversed.

answered
0

I was able to fix the problem by creating the missing index. The following query in SQL worked for me.

CREATE INDEX [idx_debitcard$debitcard_shorttran_debitcard$shorttran_debitcard$debitcard] ON [debitcard$debitcard_shorttran]

Thanks Stephan for your suggestion.

answered