# Bug OP-15317 - Direct upgrade from OpenProject 11 to  14 db migration RemoveDestroyedHelpTexts not working

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-15317

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 14.5.0 |
| Observed in versions | 14.2.0 |
| Sprint | 14.5.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 14.2.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Tizian Rößler |
| Accountable | Oliver Günther |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

*Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?). Example:*

1.  Install OpenProject 11.2.3

2.  Create a custom field

3.  Create help text for the created custom field

4.  Delete the custom field

5.  Upgrade to 14.2.0

### What is the buggy behavior?

*Please describe the bug in as much detail as possible. Example:*

  - You get an error druing the database migration
    
      - I, [2024-06-19T16:40:44.779165 <mention class="mention" data-id="468043" data-type="work_package" data-text="#468043">#468043</mention>]  INFO -- : Migrating to RemoveDestroyedHelpTexts (20211117195121)  
        \== 20211117195121 RemoveDestroyedHelpTexts: migrating =========================  
        rake aborted\!  
        StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
    
      - Undeclared attribute type for enum 'status'. Enums must be backed by a database column or declared with an explicit type via \`attribute\`.

### What is the expected behavior?

*Describe how the application should behave like. Example:*

1.  The migration works as expected

### Workaround

Open a database console to the OpenProject-Database:

``` shell
psql $(sudo openproject config:get DATABASE_URL)
```

Run the following SQL statement:

``` sql
INSERT INTO schema_migrations (version) VALUES (20211117195121);
```

Run the openproject configure command:

``` shell
sudo openproject configure
```

Open a database console again:

``` shell
 psql $(sudo openproject config:get DATABASE_URL)
```

Run the following SQL statement:

``` sql
DELETE FROM schema_migrations WHERE version='20211117195121';
```

Run the openproject confgure command again:

``` shell
sudo openproject configure
```
