Fix jobs_new table already exists when upgrading
In some cases, people have already attempted to upgrade
from 8.5.0 to 8.6.x, and have failed, leaving a jobs_new table
around in the database, which causes us issues.
This commit fixes that by dropping the leftover table if it exists.
@@ -5,6 +5,12 @@ type v11Schema struct{}
func (s v11Schema) Deploy(db *DB) error {
var err error
+ //drop the jobs_new table if it exists
+ err = db.Exec(`DROP TABLE IF EXISTS jobs_new`)
+ if err != nil {
+ return err
+ }
+
// set the tenant_uuid column to NOT NULL
err = db.Exec(`CREATE TABLE jobs_new (
uuid UUID PRIMARY KEY,
