[x]
):I'd like to know which table gitea stores its users in. I've been trying to migrate from mysql to postgres, but for the life of me I don't understand where gitea stores its users. To check where it stores users, I launched two different instances of gitea, with one using mysql and the other using postgresql. I then added a user during installation for both. I checked the user
table in both mysql and postgres. The mysql one is populated as I expect it to, but I don't see the postgres user
table being populated when I add a new user.
This is quite vexing, because my production instance has all its users in the user
table in mysql which I cannot migrate over: I don't know where users get stored in postgres. Every other table is migrating over perfectly fine.
maybe do a fresh install and and just purge db after install (e.g. in VM/docker)? this probably will answer all other questions like "where is X stored"
I found it, sorry, I overlooked something silly. Now the only problem is that it tells me my password is wrong. :/
@savyajha you can reset password via command line: https://docs.gitea.io/en-us/command-line/
I'm going to close this ticket now as you've discovered the table.
Hello,
I had the same issue (user
table seems unpopulated), which is more postgres
related, but I solved by doing this:
$ sudo -u postgres psql
postgres=# \c gitea
gitea=# SELECT * FROM public.user;
Yeah, thanks. Another way is to quote "user"
. My problem is that the tool I used for import from mysql didn't associate the tables with the public schema, which meant that gitea couldn't really access them.
Most helpful comment
Hello,
I had the same issue (
user
table seems unpopulated), which is morepostgres
related, but I solved by doing this: