-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to run patch-add-invert-keyword.sql during deployment #5151
Comments
Recommendation; |
Not able to reproduce. And we never received such report from 1.22.1. |
it's clearly a botched deployment in my instance, where I had to rollback to 1.22.1 (possibly higher, it's almost a year ago since this was deployed). Now I can't deploy any newer version to the migration failing. if you want to recreate you will need to deploy higher version, then rollback to 1.22.1 then upgrade. The easiest fix is to check for the column during the migration this way the migration can run successfully. the alternatives are modifying the database per container or redeploying a new instance and hoping the export/import migrates most of my settings. |
This might not be supported. Solving this might need to involve looking at the database schema in an editor and determine if the migration was applied. If it was, you can mark it as such. |
Working hypothesis is that kubernetes deployment failed, the migration successfully ran and made a change to the database table. Due to the failed deployment I rolled back to 1.22.1. Given this is a new column an the older version has no issue with that and it's been working since. The issue right now this migration that has already taken place is blocking new releases. |
📑 I have found these related issues/pull requests
n/a
🛡️ Security Policy
Description
Currently running 1.22.1, trying to deploy the latest image but running into an issue with patching the DB
[DB] INFO: SQLite Version: 3.41.1 2024-10-01T22:28:04.677082857-04:00 2024-10-02T02:28:04Z [SERVER] INFO: Connected 2024-10-01T22:28:04.681933785-04:00 2024-10-02T02:28:04Z [DB] INFO: Your database version: 10 2024-10-01T22:28:04.682987928-04:00 2024-10-02T02:28:04Z [DB] INFO: Latest database version: 10 2024-10-01T22:28:04.683779502-04:00 2024-10-02T02:28:04Z [DB] INFO: Database patch not needed 2024-10-01T22:28:04.685781489-04:00 2024-10-02T02:28:04Z [DB] INFO: Database Patch 2.0 Process 2024-10-01T22:28:04.709987610-04:00 2024-10-02T02:28:04Z [DB] INFO: patch-add-invert-keyword.sql is not patched 2024-10-01T22:28:04.711347446-04:00 2024-10-02T02:28:04Z [DB] INFO: patch-add-invert-keyword.sql is patching 2024-10-01T22:28:04.719353490-04:00 2024-10-02T02:28:04Z [DB] INFO: Closing the database 2024-10-01T22:28:06.745397245-04:00 2024-10-02T02:28:06Z [DB] INFO: SQLite closed 2024-10-01T22:28:06.747357467-04:00 [Error: ALTER TABLE monitor 2024-10-01T22:28:06.747422165-04:00 ADD invert_keyword BOOLEAN default 0 not null - SQLITE_ERROR: duplicate column name: invert_keyword] { 2024-10-01T22:28:06.747434370-04:00 errno: 1, 2024-10-01T22:28:06.747441832-04:00 code: 'SQLITE_ERROR' 2024-10-01T22:28:06.747458226-04:00 } 2024-10-01T22:28:06.748052736-04:00 2024-10-02T02:28:06Z [DB] ERROR: Start Uptime-Kuma failed due to issue patching the database
👟 Reproduction steps
deploying any version newer than 1.22.1
👀 Expected behavior
Upgrading without recreating all monitors
😓 Actual Behavior
Failed state, cannot proceed with upgrades
🐻 Uptime-Kuma Version
1.22.1
💻 Operating System and Arch
Ubuntu 22.04
🌐 Browser
Crhome Version 129.0.6668.60 (Official Build) (x86_64)
🖥️ Deployment Environment
📝 Relevant log output
The text was updated successfully, but these errors were encountered: