# Bug OP-5095 - db:migrate fails: PG::UndefinedTable: FEHLER:  Relation »planning_element_type_colors_pkey« existiert nicht

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 8.1.0 |
| Observed in versions | 8.0.0 |
| Sprint | 8.1.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 8.0.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 |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

Hello,

I’m trying to upgrade my packaged installation of openproject to 8.0.0-1537277987.b4ac3e7c.jessie. The previously installed version was the latest 7 release available for jessie.  
My system:

*   OS: Debian Jessie
*   DB: Postgres

The package upgrade itself went without problems. But after running `openproject configure` afterwards, the DB migration fails:

```text
== 20180510184732 RenamePlanningElemntTypeColorsToColors: migrating ===========
-- rename_table(:planning_element_type_colors, :colors)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedTable: FEHLER:  Relation »planning_element_type_colors_pkey« existiert nicht
: ALTER INDEX "planning_element_type_colors_pkey" RENAME TO "colors_pkey"

```
