Content
View differences
Updated by Daniel Hammer over 5 years ago
### **Environment**:
OpenProject Version: 10.6.5, upgrading to 11.0.x (on-premise)
Operating System: Ubuntu 20.04 LTS
### **Steps to reproduce:**
1. Follow official OP major version upgrade guidlines
2. install OP 11.0.x (tried 11.0.0, 11.0.1, 11.0.3)
3. run migration command in command line
### **Actual Behavior**
The migration process aborts because of an error. Probably while doing some DB migration?
### Command line output:
```text
[2020-12-09T20:40:07.143184 #2540352] INFO -- : Migrating to ExtendJobStatus (20200610124259)
== 20200610124259 ExtendJobStatus: migrating ==================================
-- execute(" ALTER TYPE delayed_job_status ADD VALUE IF NOT EXISTS 'cancelled';\n")
-> 0.0004s
-- remove_reference(:delayed_job_statuses, :job)
-> 0.0011s
-- change_table(:delayed_job_statuses)
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Index name 'index_delayed_job_statuses_on_job_id' on table 'delayed_job_statuses' already exists
```
### **Expected Behavior**
Migration is completed successfully.
### Experimental Workaround?
We found out that the following "manual" modification of the PostgreSQL database seems to "remove the problem", as the migration runs successfully after applying it once (or twice, in case the following migration try fails again). But we do not know, whether this creates other problems. Would be great to get your expert thoughts on that.
```text
psql $(openproject config:get DATABASE_URL)
DROP INDEX index_delayed_job_statuses_on_job_id ;
\q
openproject configure
Wenn es nochmal fehlschlägt, dann nochmal ausführen und dann kompiliert er durch
```
### Other Thoughts:
I think there is a relation to: <mention class="mention" data-id="#35099" data-type="work_package" data-text="#35099">#35099</mention>
OpenProject Version: 10.6.5, upgrading to 11.0.x (on-premise)
Operating System: Ubuntu 20.04 LTS
### **Steps to reproduce:**
1. Follow official OP major version upgrade guidlines
2. install OP 11.0.x (tried 11.0.0, 11.0.1, 11.0.3)
3. run migration command in command line
### **Actual Behavior**
The migration process aborts because of an error. Probably while doing some DB migration?
### Command line output:
```text
[2020-12-09T20:40:07.143184 #2540352] INFO -- : Migrating to ExtendJobStatus (20200610124259)
== 20200610124259 ExtendJobStatus: migrating ==================================
-- execute(" ALTER TYPE delayed_job_status ADD VALUE IF NOT EXISTS 'cancelled';\n")
-> 0.0004s
-- remove_reference(:delayed_job_statuses, :job)
-> 0.0011s
-- change_table(:delayed_job_statuses)
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Index name 'index_delayed_job_statuses_on_job_id' on table 'delayed_job_statuses' already exists
```
### **Expected Behavior**
Migration is completed successfully.
### Experimental Workaround?
We found out that the following "manual" modification of the PostgreSQL database seems to "remove the problem", as the migration runs successfully after applying it once (or twice, in case the following migration try fails again). But we do not know, whether this creates other problems. Would be great to get your expert thoughts on that.
```text
psql $(openproject config:get DATABASE_URL)
DROP INDEX index_delayed_job_statuses_on_job_id ;
\q
openproject configure
Wenn es nochmal fehlschlägt, dann nochmal ausführen und dann kompiliert er durch
```
### Other Thoughts:
I think there is a relation to: <mention class="mention" data-id="#35099" data-type="work_package" data-text="#35099">#35099</mention>