Primary key error when deploying a project

Hi there I get this error when deploying my project Request action: execute_ddl_commands Message: Executing DDL commands failed. Cause: Error (SQL State: 23000, Error Code: 2627) on executing: INSERT INTO [system_cb_attributesequences] ([sequencename], [tablename], [columnname], [currentvalue]) VALUES ('questionnaire$section_backgroundnumber_mxseq', 'questionnaire$section', 'backgroundnumber', 4968); All changes are rolled back. Stack trace: com.mendix.m2ee.api.AdminException: Executing DDL commands failed. at com.mendix.core.MxRuntime.c(SourceFile:509) Caused by: af: Error (SQL State: 23000, Error Code: 2627) on executing: INSERT INTO [system_cb_attributesequences] ([sequencename], [tablename], [columnname], [currentvalue]) VALUES ('questionnaire$section_backgroundnumber_mxseq', 'questionnaire$section', 'backgroundnumber', 4968); All changes are rolled back. at A.a(SourceFile:88) Caused by: Violation of PRIMARY KEY constraint 'PK__system_c__2DEB503423150941'. Cannot insert duplicate key in object 'dbo.system_cb_attributesequences'. The duplicate key value is (questionnaire$section_backgroundnumber_mxseq). at at at at at at$StmtExecCmd.doExecute( at at at at at at org.apache.commons.dbcp.DelegatingStatement.execute( at org.apache.commons.dbcp.DelegatingStatement.execute( at A.a(SourceFile:171) at A.a(SourceFile:46) at jm.a(SourceFile:164) at jm.d(SourceFile:157) at com.mendix.core.MxRuntime.c(SourceFile:504) at el.execute(SourceFile:33) at com.mendix.m2ee.server.handler.AdminHandler.handle( at org.eclipse.jetty.server.handler.HandlerWrapper.handle( at org.eclipse.jetty.server.Server.handle( at org.eclipse.jetty.server.HttpConnection.handleRequest( at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete( at org.eclipse.jetty.http.HttpParser.parseNext( at org.eclipse.jetty.http.HttpParser.parseAvailable( at org.eclipse.jetty.server.HttpConnection.handle( at at org.eclipse.jetty.util.thread.QueuedThreadPool$ at I have deleted the record it is complaining about but this does not help it just gets a duplicate on the next record. If i delete the table it just gets a duplicate error on the next table! If i create a new clean database the system works. What can i do to rectify this problem without creating a new database? Thanks Patrick
1 answers

Not an answer as we don't have enough information yet, but some extra cautionionary advice:

Be careful when you are manually changing things in your database. Especially in 3.0 this will almost certainly lead to problems because of the way database synchronization has been changed there. In 3.0 we keep system administration tables that give us more information about all kinds of things such as inheritance structures. We can deal with many more cases now than in 2.5. A side effect is that manually changing/deleting tables will make your database corrupt if the administration tables still contain the old information.