0

FogBugz encountered an error upgrading your FogBugz database and rolled back all changes. The error is:

Wasabi.Runtime.WasabiException (0x80004005): Invalid column name 'ixBugEvent'. SQL: UPDATE Attachment SET Attachment.ixBugEvent = BugEvent.ixBugEvent FROM Attachment, BugEvent WHERE BugEvent.ixAttachment IS NOT NULL AND BugEvent.ixAttachment = Attachment.ixAttachment ---> System.Data.SqlClient.SqlException: Invalid column name 'ixBugEvent'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Wasabi.Runtime.ADO.Command.ExecuteNonQuery() in c:\code\release\build\fogbugz\8.3.42\Wasabi\Wasabi.Runtime\ADO\Command.cs:line 95 at Wasabi.Runtime.ADO.Connection.<>c_DisplayClass4.b_3() in c:\code\release\build\fogbugz\8.3.42\Wasabi\Wasabi.Runtime\ADO\Connection.cs:line 59 at Wasabi.Runtime.ADO.Util.RerunIfDeadlock(Action action) in c:\code\release\build\fogbugz\8.3.42\Wasabi\Wasabi.Runtime\ADO\Util.cs:line 28 at Wasabi.Runtime.ADO.Connection.ExecuteNonQuery(String CommandText) in c:\code\release\build\fogbugz\8.3.42\Wasabi\Wasabi.Runtime\ADO\Connection.cs:line 57 at FogCreek.FogBugz.CSQLRunner.RunSQL(String sCmd) in c:\code\release\build\fogbugz\8.3.42\FogBugz\distribution\src-Website\CSQLRunner.was:line 26 at Wasabi.Runtime.Error.Raise(Int32 number, String source, String description, String helpfile, Nullable`1 helpcontext) in c:\code\release\build\fogbugz\8.3.42\Wasabi\Wasabi.Runtime\Error.cs:line 88 at FogCreek.FogBugz.CSQLRunner.RunSQL(String sCmd) in c:\code\release\build\fogbugz\8.3.42\FogBugz\distribution\src-Website\CSQLRunner.was:line 33 at FogCreek.FogBugz.CSchema.FinalUpdates(Int32 oldVersion) in c:\code\release\build\fogbugz\8.3.42\FogBugz\distribution\src-Website\CSchema.was:line 1748 at FogCreek.FogBugz.CSchema.UpdateDB(Int32 OldVersion, Boolean bForce) in c:\code\release\build\fogbugz\8.3.42\FogBugz\distribution\src-Website\CSchema.was:line 137 at FogCreek.FogBugz._Global.UpgradeDatabaseVersion(Boolean fForce) in c:\code\release\build\fogbugz\8.3.42\FogBugz\distribution\src-Website\dbUpgrade.was:line 287 at FogCreek.FogBugz._Global.UpgradeWithRollback(Boolean fForce) in c:\code\release\build\fogbugz\8.3.42\FogBugz\distribution\src-Website\dbUpgrade.was:line 240

Actions: CreateTable TitleWord CreateIndex TitleWord,IX_IxWordIxBug CreateIndex TitleWord,TitleWordixBug RunHookFunction StartBackfillTitleWords BeginFinalUpdate FinalUpdates BeginFinalUpdate 473 DoneFinalUpdate 473 BeginFinalUpdate 447to475 End list

flag
I've emailed you to troubleshoot this install-specific issue offline. If anyone else is reading this and is interested in the answer, please email us at customer-service@fogcreek.com and we'll give you an update. – Rich Armstrong Mar 4 2011 at 14:45

closed as too localized by Rich Armstrong♦♦ Mar 4 2011 at 14:49

2 Answers

1

OK, so this is not a particularly good situation to be in. FogBugz has gone through lots of schema changes and runs some upgrade code whenever it sees an older database. Usually, this just works. For a couple reasons, though, the bigger the jump, the more likely something goes wrong.

Sometime around FB 5, we added a new ixBugEvent column to the Attachment table. We then deleted that column for FB 8. The way our upgrade code works is to first add/delete tables and columns then fix things up. In this case, the column wasn't added because it's not really missing, but some of the midway upgrade code thinks that column will be there.

Adding the column by hand fixed that issue.

But there's a wrinkle. The original code to add that column also initiated a "backfill" to populate it. That code wasn't run, and essentially can't be at this time. (The backfill wouldn't work right anyway with the subsequent schema changes. The FB 8 upgrade code assumes that the backfill ran and completed long ago.)

I think the only solution is to start over with the FogBugz 4 database, upgrade to an intermediate release like FogBugz 7, wait a few days for the backfill to complete, and then upgrade to FogBugz 8. It's probably best to get in touch with support directly via email.

link|flag
0

I think I fixed this by adding ixBugevent column to Attachment table and re-running db upgrade. Anyone see probs with this?

link|flag
We can no longer view attachments made in previous version (version 4). Attachments added after the upgrade to v8 work OK. How do I get attachments to view? – Fraserwilk Mar 3 2011 at 5:44
re: what @ted said, I've hit problems like this with other customers making multi-version upgrades. Definitely email us. Make sure not to use the new FogBugz 8 setup until we get it fixed because you will need to revert back to the 4.0 database so you will lose any new case information – adambox Mar 3 2011 at 16:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.