Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andy Felton 185 posts 484 karma points c-trib
    Aug 14, 2018 @ 11:13
    Andy Felton
    0

    Forms migration errors

    Hi,

    I've got a website which seems to be trying to perform a migration on Forms even though it's complete. I'm seeing the following in the logs:

     2018-08-14 12:03:42,827 [P5424/D8/T52] DEBUG Umbraco.Forms.Web.Migrations.MigrationEvents - Versions: this=7.0.3, installed=0.0.0
     2018-08-14 12:03:42,827 [P5424/D8/T52] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Initializing database migrations
     2018-08-14 12:03:42,858 [P5424/D8/T52] INFO  Umbraco.Forms.Web.Migrations.TargetVersionSix.MoveFilesToAppData - There is already a /Data folder in Forms' file system with files. Will not attempt to move files here.
     2018-08-14 12:03:42,858 [P5424/D8/T52] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'MoveFilesToAppData' to context
     2018-08-14 12:03:42,983 [P5424/D8/T52] ERROR Umbraco.Core.Persistence.UmbracoDatabase - Exception (5339be43).
     System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.cmsMacro' with unique index 'IX_cmsMacroPropertyAlias'. The duplicate key value is (renderUmbracoForm).
     The statement has been terminated.
    

    Have looked in the database I'd suggest the migration has already happened but for some reason it still thinks we're are version 0.0.0.

    Any help to resolve would be appreciated.

    Thanks

    Andy

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Aug 14, 2018 @ 12:12
    Nik
    0

    Hey Andy,

    Is there an entry for Forms in this table in the database:

    [umbracoMigration]

    Thanks,

    Nik

  • Andy Felton 185 posts 484 karma points c-trib
    Aug 14, 2018 @ 12:33
    Andy Felton
    0

    Hi Nick,

    Just checked that and there is no entry for Forms in the [umbracoNavigration] table.

    Thanks Andy

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Aug 14, 2018 @ 12:59
    Nik
    0

    Okay, so that is the reason why it continues to keep running. The concern about just adding an entry in there is has the migration managed to run fully at least once. However, I don't know what the best way to check that is.

    You might want to speak direct to the HQ and ask them for a full break down of what the migrations should do so you can check that all steps have run. If they have you could manually add an entry to the Migrations table. If they haven't the HQ should be able to advise you on what steps to take next.

    Sorry I can't be of more help :-)

    Cheers

    Nik

  • Luke Maslany 6 posts 74 karma points
    Jul 09, 2019 @ 13:15
    Luke Maslany
    0

    Hello Andy.

    Apologies for necroing the thread but do you recall if you got a resolution to this? I've recently been tasked with maintaining an Umbraco instance (my first) and I am seeing the same issue - even the same version numbers and duplicate key name! :)

    Many thanks, Luke

Please Sign in or register to post replies

Write your reply to:

Draft