Unable to update database to version 1400 after upgrade



  • Hi - I followed the guide to upgrade to version 1.4.0 on Windows but I'm stuck at the point where I log in and upgrade the database to version 1400. I've tried dropping the database and restoring it again from a backup but I'm met with the same error every time. At FIRST login after the database is restored and an attempt is made to upgrade it, this is the error:

    Could Not Update Database To Version 1400
    Cannot add or update a child row: a foreign key constraint fails ("clonedeploy"."#sql-164c_d", CONSTRAINT "fk_ug_right_user" FOREIGN KEY ("usergroup_id") REFERENCES "clonedeploy_user_groups" ("clonedeploy_user_group_id") ON DELETE CASCADE ON UPDATE NO ACTION)

    Subsequent logins present with this error when trying to upgrade:

    Could Not Update Database To Version 1400
    Can't DROP COLUMN erase_partitions; check that it exists

    I'm only really using Clonedeploy for multicasting images to many devices at once - I have 20 or so images that I have saved - so if there's an easy way to just re-import those saved images without restoring/upgrading the database, can someone tell me how to do that? Otherwise is there any fix for this particular issue? I was having problems using the search function on the site so I apologize if this has already been asked.

    Thanks.



  • What version were you on before you upgraded?



  • Are you using user groups to manage permissions? It looks like something is going on there. We could probably delete everything from the user groups table and the user group rights table to move on



  • I was on 1.3.5 before.

    I did have one user group before but I'm not actively using it to manage permissions. I only really use one account but we had 3 in total.

    Would it just be

    DROP TABLE clonedeploy_user_groups;
    CREATE TABLE clonedeploy_user_groups;

    DROP TABLE clonedeplot_usergroup_rights;
    CREATE TABLE cloendeploy_usergroup_rights;

    ?

    EDIT: So I DELETE FROM both of those tables and it removed 15 entries but still getting this error:
    Could Not Update Database To Version 1400
    Can't DROP COLUMN erase_partitions; check that it exists