Content
View differences
Updated by Markus Kahl 4 days ago
Very similar to [previous bug](https://community.openproject.org/projects/openproject/work_packages/74539/activity), but still relevant.
### Steps to reproduce
1. Setup clean 16.6.10
2. Create user and group and add user to that group
3. Add group to the project with Project admin role.
4. Try to migrate to 17.4.0
### What is the buggy behavior?
Migration failed
### What is the expected behavior?
_Migration successful_
### **Logs**
> rake aborted!
> StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
>
> PG::UndefinedTable: ERROR: relation "group\_details" does not exist
> LINE 1: ...\_descendants(id) AS ( SELECT gd.principal\_id FROM group\_deta...
Full stacktrace attached as file/
### Additional scenario
Similarly to the error above, this migration can also fail in other ways depending on the data in the OpenProject environment. The 2nd case may happen when users have the `manage_members` permission which then ends in the following error during the migration:
```text
Undeclared attribute type for enum 'sharing' in Meeting. Enums must be backed by a database column or declared with an explicit type via `attribute`.
```
The full logs for this scenario are attached as [migration-errror-meeting-enum.log](https://community.openproject.org/attachments/921441/migration-errror-meeting-enum.log).
The workaround (for the packaged installation) for that particular case is to do the following:
1. apt update & apt upgrade
2. comment out line 48 in /opt/openproject/db/migrate/20250929070310\_add\_view\_all\_principals\_permission\_to\_existing\_roles.rb
3. openproject run configure
4. openproject run console with:
require Rails.root.join("db/migrate/20250929070310\_add\_view\_all\_principals\_permission\_to\_existing\_roles.rb")
AddViewAllPrincipalsPermissionToExistingRoles.new.send :add\_global\_role\_for\_manage\_members
### Environment information
* Docker-compose installation
* Docker development environment
**OpenProject version**
16.6.10 → 17.4.0
### Steps to reproduce
1. Setup clean 16.6.10
2. Create user and group and add user to that group
3. Add group to the project with Project admin role.
4. Try to migrate to 17.4.0
### What is the buggy behavior?
Migration failed
### What is the expected behavior?
_Migration successful_
### **Logs**
> rake aborted!
> StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
>
> PG::UndefinedTable: ERROR: relation "group\_details" does not exist
> LINE 1: ...\_descendants(id) AS ( SELECT gd.principal\_id FROM group\_deta...
Full stacktrace attached as file/
### Additional scenario
Similarly to the error above, this migration can also fail in other ways depending on the data in the OpenProject environment. The 2nd case may happen when users have the `manage_members` permission which then ends in the following error during the migration:
```text
Undeclared attribute type for enum 'sharing' in Meeting. Enums must be backed by a database column or declared with an explicit type via `attribute`.
```
The full logs for this scenario are attached as [migration-errror-meeting-enum.log](https://community.openproject.org/attachments/921441/migration-errror-meeting-enum.log).
The workaround (for the packaged installation) for that particular case is to do the following:
1. apt update & apt upgrade
2. comment out line 48 in /opt/openproject/db/migrate/20250929070310\_add\_view\_all\_principals\_permission\_to\_existing\_roles.rb
3. openproject run configure
4. openproject run console with:
require Rails.root.join("db/migrate/20250929070310\_add\_view\_all\_principals\_permission\_to\_existing\_roles.rb")
AddViewAllPrincipalsPermissionToExistingRoles.new.send :add\_global\_role\_for\_manage\_members
### Environment information
* Docker-compose installation
* Docker development environment
**OpenProject version**
16.6.10 → 17.4.0