Closed sueskind closed 2 years ago
Hi @sueskind
Can you please try to run the command as follows: docker-compose exec postgres psql -U user ghostfolio-db
Thank you, this got me to a prompt where I could issue the remaining commands. However, I can still login with the Admin token after performing the last two steps, this should not be possible, right?
Namely, I did:
UPDATE "User" SET "role" = 'ADMIN WHERE "provider" = 'ANONYMOUS';
DELETE FROM "User" WHERE "alias" = 'Admin';
Did you get any feedback message after running the commands?
- UPDATE "User" SET "role" = 'ADMIN WHERE "provider" = 'ANONYMOUS';
Here is a typo: the single quote after ADMIN
is missing
Yes, that was it. I was just copy-pasting the command without checking them...
However, there seem to be multiple foreign key constraints which make directly running the DELETE
command impossible. Maybe there should be a better way to delete the default Admin user?
Anyway, I am closing this now as you answered my original question, thank you very much.
Yes, that was it. I was just copy-pasting the command without checking them...
@sueskind I am glad it worked out 😃
A better way than deleting the default Admin user could be to not seed an Admin user, but automatically create the first user as an Admin if there is no one in the database yet. What do you think?
I am trying to follow the setup steps in the README. However, as I have only basic knowledge of docker(-compose) and PostgreSQL, I was not able to do the "Finalization" steps (namely accessing the database).
In issue #635 basically the same question is raised but when I follow the steps of the answer I get the following error when doing
docker-compose exec postgres psql -U user
in thedocker
directory:What am I missing?