sigcore
sigcore7mo ago

Database migration error during upgrade

Hello! I'm trying to upgrade to 1.293.1 (CE) from v1.237.0 During startup, windmill fails with this error:
Error: Migrating database: while executing migrations: error returned from database: column "external_id" of relation "instance_group" does not exist
Error: Migrating database: while executing migrations: error returned from database: column "external_id" of relation "instance_group" does not exist
Screenshot of the logs attached but it's basically the same thing. Was there a manual step I missed for an upgrade somewhere?
No description
4 Replies
rubenf
rubenf7mo ago
no manual step should have been needed. Something is wrong with your db/setup
sigcore
sigcore7mo ago
Hmm, it restarted a few times before the logs in my screenshot. If I go back far enough, it did do a few migrations first
No description
rubenf
rubenf7mo ago
would advise using the old image, using cli sync to backup your current workspace, then create a new database and starting from fresh you have a table that is missing a column for no reason so something funky must have happened
sigcore
sigcore7mo ago
in that log, it shows "Finished applying migration 20240119112456" but in the _sqlx_migrations, that migration doesnt have a row. The last one was the one before that: "20240113112935: remove account perms" it's been a while since I used the cli sync, does it back up the secrets/variables/etc too? I was wanting to re-install windmill and setup from the beginning with oidc/oauth so it might be the excuse I need to do that lol Using the old image did work still, so I ended up using wmill sync to backup my workspace, reinstalled from scratch, and used sync again to restore the workspace. It seems like all is good now on the newer version. thanks!