Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

17.3.0 migration fails (group_details missing) when upgrading from 16.3.2 (works on 17.2.3)

Open
#154 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
docker-compose, postgresql
Domain
databases, devops

Research direction

Start with the 20250929070310_add_view_all_principals_permission_to_existing_roles migration and run the provided Docker Compose seeder against the 16.3.2 database dump on 17.3.0. Compare the migration ordering around add_group_details with 17.2.3; done means the upgrade completes without the group_details error and the application starts.

Written by the indexing model from the issue text.

Description

Environment
  • Product: OpenProject
  • Source version: 16.3.2
  • Target version (failing): 17.3.0
  • Target version (working): 17.2.3
  • Deployment: official Docker Compose (openproject-docker-compose)
  • Database: PostgreSQL
  • Source DB: PostgreSQL 13
  • Target DB: PostgreSQL 17 (via dump/restore)
  • OS: Linux (Ubuntu)
  • CPU: 4 cores
Summary

Upgrading from 16.3.2 → 17.3.0 fails during migrations with:

PG::UndefinedTable: relation "group_details" does not exist

Running the same upgrade path against 17.2.3 completes successfully.

This suggests a regression in 17.3.0 migration ordering or model usage during migration.

Steps to Reproduce
  1. Start from a working 16.3.2 installation
  2. Dump database from PostgreSQL 13
  3. Restore into a fresh PostgreSQL 17 instance
  4. Use official Docker Compose setup
  5. Set:
TAG=17.3.0
POSTGRES_VERSION=17
  1. Run:
docker compose run --rm seeder
Expected Behavior

All migrations complete successfully and application starts.

Actual Behavior

Migration fails at:

20250929070310_add_view_all_principals_permission_to_existing_roles

with error:

PG::UndefinedTable: ERROR: relation "group_details" does not exist
Relevant Logs
ActiveRecord::StatementInvalid: PG::UndefinedTable:
ERROR: relation "group_details" does not exist

(occurs during migration execution)

Additional Observations
  • The same database dump:
    • ✅ Migrates successfully on 17.2.3
    • ❌ Fails on 17.3.0
  • Earlier migration list shows add_group_details occurs after the failing migration, suggesting ordering or dependency issue.
  • This occurs on a clean PostgreSQL 17 data directory, ruling out stale data.
Workaround

Downgrading to:

TAG=17.2.3

allows migration to complete successfully.

Suspected Cause

A migration in 17.3.0 references group_details before the table is created, possibly due to:

  • incorrect migration ordering
  • model loading referencing new schema prematurely
  • missing dependency between migrations
Request

Please confirm:

  • whether this is a known issue in 17.3.0
  • if a fix is planned (e.g. 17.3.1)
  • or recommended upgrade path/workaround
Dominant language
Shell
Stars
347
Forks
319
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from opf/openproject-docker-compose

All issues in opf/openproject-docker-compose

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.