BeWelcome / rox

:earth_africa: BeWelcome lets you share a place to stay, connect with travellers, meet up and find accommodation on your journey. It is and will always be a free, open source, non for profit, democratic community.
https://www.bewelcome.org
GNU General Public License v2.0
188 stars 54 forks source link

Clean setup leads to error `Unknown column 'specialrelations.Type'` on edit profile page #337

Closed PLP-GTR closed 8 months ago

PLP-GTR commented 8 months ago

After a clean install using docker the edit profile page is showing an error:

image


Coming from: https://github.com/BeWelcome/rox/issues/219#issuecomment-1839682364

I debugged it a bit. Maybe it's not related to the docker setup, so I don't know if offtopic.

The SQL query leading to the error:

SELECT
    specialrelations.Id AS id,
    specialrelations.IdRelation AS IdRelation,
    members.Username,
    specialrelations.Type AS Type,
    specialrelations.Comment AS Comment,
    specialrelations.Confirmed AS Confirmed
FROM
    specialrelations,
    members
WHERE
    specialrelations.IdOwner = 1  AND
    specialrelations.IdRelation = members.Id AND
    members.Status in ('Active', 'ActiveHidden', 'ChoiceInactive', 'OutOfRemind', 'Pending')
ORDER BY members.Username ASC

Unfortunately the error is catched and not given to frontend. I've connected to the DB and executed it manually, leading to the error:

Unknown column 'specialrelations.Type' in 'field list'

The column is missing, I've checked the migrations and can't find it there. Only occurrence of specialrelations is the modernize table comments1 migration (link):

image

Did I miss some migration command?

Re-applying the test database did not fix it: $ docker-compose exec php sh -c "php bin/console test:database:create --drop --force"