upgrade

Marco's Avatar

Marco

29 Oct, 2013 09:37 AM

Error during version UPGRADE

HgLab.Core.Framework.Servicing.ServicingException: Could not perform Upgrade from version 0.3.10.0 to version 0.4.4.0 ---> HgLab.Core.Framework.Servicing.ServicingException: Could not execute DbMigrationTask for running version 0.3.10.0 and target version 0.4.4.0 ---> HgLab.Core.Framework.Servicing.Db.DbMigrationException: Cannot upgrade to '0.4.0' ---> HgLab.Core.Framework.Servicing.Db.DbMigrationException: Cannot execute 'create table [Discussion] (
[ID] bigint not null ,
[RepositoryID] bigint null ,
[Changeset] nvarchar(200) null ,
primary key (ID)
);

' ---> System.Data.SqlClient.SqlException: There is already an object named 'Discussion' in the database.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.ApplyMigration(SqlTransaction sqlTransaction, SqlConnection sqlConnection, String migration) in z:\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 95
   --- End of inner exception stack trace ---
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.ApplyMigration(SqlTransaction sqlTransaction, SqlConnection sqlConnection, String migration) in z:\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 103
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.UpgradeDatabase(SqlTransaction sqlTransaction, SqlConnection sqlConnection, Version migrationVersion) in z:\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 76
   --- End of inner exception stack trace ---
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.UpgradeDatabase(SqlTransaction sqlTransaction, SqlConnection sqlConnection, Version migrationVersion) in z:\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 83
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.UpgradeDatabase(SqlTransaction sqlTransaction, SqlConnection sqlConnection, List`1 migrationVersions) in z:\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 65
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.UpgradeDatabase(Version currentVersion, Version targetVersion) in z:\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 53
   at HgLab.Core.Framework.Servicing.Impl.DbMigrationTask.InternalExecute(Version runningVersion, Version targetVersion) in z:\hglab\src\HgLab.Core\Framework\Servicing\Impl\DbMigrationTask.cs:line 12
   at HgLab.Core.Framework.Servicing.Task.Execute(Version runningVersion, Version targetVersion) in z:\hglab\src\HgLab.Core\Framework\Servicing\Task.cs:line 21
   --- End of inner exception stack trace ---
   at HgLab.Core.Framework.Servicing.Task.Execute(Version runningVersion, Version targetVersion) in z:\hglab\src\HgLab.Core\Framework\Servicing\Task.cs:line 30
   at HgLab.Core.Framework.Servicing.Impl.ServicingManagerService.ExecuteTaskSequence(IEnumerable`1 taskSequence, Version runningVersion, Version targetVersion) in z:\hglab\src\HgLab.Core\Framework\Servicing\Impl\ServicingManagerService.cs:line 64
   at HgLab.Core.Framework.Servicing.Impl.ServicingManagerService.PerformUpgrade() in z:\hglab\src\HgLab.Core\Framework\Servicing\Impl\ServicingManagerService.cs:line 111
   --- End of inner exception stack trace ---
   at HgLab.Core.Framework.Servicing.Impl.ServicingManagerService.PerformUpgrade() in z:\hglab\src\HgLab.Core\Framework\Servicing\Impl\ServicingManagerService.cs:line 120
   at HgLab.Areas.Dashboard.Controllers.ServicingController.Upgrade(UpgradeModel model) in z:\hglab\src\HgLab\Areas\Dashboard\Controllers\ServicingController.cs:line 41

  1. Support Staff 1 Posted by Anton Gogolev on 30 Oct, 2013 07:42 AM

    Anton Gogolev's Avatar

    Marco,

    My apologies: your email somehow got into "Spam" folder in Tender.

    Could you please run the following statement against your HgLab database and post the output here:

    select * from dbo.SchemaInfo
    
  2. 2 Posted by Marco on 30 Oct, 2013 09:27 AM

    Marco's Avatar

    Here results

    Version
    --------------------
    20120604195202
    20120613183158
    20120614173519
    20120713065451
    20120720092613
    20120720164056
    20120723161153
    20120724060039
    20120727164700
    20120727165946
    20120727172139
    20120828062556
    20120828063342
    20120831052150
    20120831054840
    20120917181823
    20121025051126
    20121030191502
    20121204120810
    20121204190637
    20121211102352
    20121217075632
    20121225101551
    20121228054715
    20121229135307
    20121229192121
    20130107120842
    20130111062120
    20130111062122
    20130111062824
    20130114052331
    20130114053150
    20130201131214
    20130202180029
    20130203182510
    20130214143801
    20130226052024
    20130226054040
    20130301062235
    20130301062236
    20130320163941
    20130329091520
    20130329091734
    20130402191706
    20130418063749
    20130422062358
    20130427142531
    20130508152537
    20130508172748
    20130508174238
    20130904063629
    20130926153849
    20130930051352
    20130930051353
    20130930051354

    (55 row(s) affected)

    Here the resultVersion
    --------------------
    20120604195202
    20120613183158
    20120614173519
    20120713065451
    20120720092613
    20120720164056
    20120723161153
    20120724060039
    20120727164700
    20120727165946
    20120727172139
    20120828062556
    20120828063342
    20120831052150
    20120831054840
    20120917181823
    20121025051126
    20121030191502
    20121204120810
    20121204190637
    20121211102352
    20121217075632
    20121225101551
    20121228054715
    20121229135307
    20121229192121
    20130107120842
    20130111062120
    20130111062122
    20130111062824
    20130114052331
    20130114053150
    20130201131214
    20130202180029
    20130203182510
    20130214143801
    20130226052024
    20130226054040
    20130301062235
    20130301062236
    20130320163941
    20130329091520
    20130329091734
    20130402191706
    20130418063749
    20130422062358
    20130427142531
    20130508152537
    20130508172748
    20130508174238
    20130904063629
    20130926153849
    20130930051352
    20130930051353
    20130930051354

    (55 row(s) affected)

  3. Support Staff 3 Posted by Anton Gogolev on 30 Oct, 2013 01:49 PM

    Anton Gogolev's Avatar

    Marco,

    Thanks! Apparently, something got mixed up during upgrade process. If there are logs in App_Data, could you please post them here?

    To solve the issue, run the following command:

    update dbo.Setting set Value = '0.4.1.0' where Module = 'application' and Property = 'version';
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Jan, 2025 05:02 PM
13 Jan, 2025 10:42 AM
29 Nov, 2024 10:00 AM
12 Jan, 2023 12:25 PM
10 Jan, 2023 04:49 PM