Closed Ziars closed 3 years ago
We need a table named session
with three columns named key
,data
,expiry
.
Should this be handled upstream?
Yes however, it may be that we need to provide then with a patch and or fork.
This seems to be still causing issues if someone wants to use a DB as session provider: [Macaron] PANIC: session/postgres: error checking existence: pq: relation "session" does not exist
. Is there any update? Even if this could not be fixed easily upstream (I guess that means go-macaron?) why could gitea not take care of it and prepare a session table like every other required table, ready to use if someone configures a DB session provider?
Although we could get the macaron session provider software to create the db table - I think we'd be better off creating a Xorm session provider that just creates the session table as appropriate.
Doing it this way, would it be possible to re-use the specified DB parameters from the [database]
section instead of adding a (somehow duplicated) PROVIDER_CONFIG
?
yes
[x]
):Greetings!
I'm using Gitea v.1.8.2 in my setup and have recently ran into strange behaviour: when changing session storage from files to MySQL Gitea doesn't create the needed table in the database. All other tables are being created normally, though (if database was initially empty). Here are some errors from logs, that could be seen right after changing session storage in clean installation from file to MySQL and restarting:
It's hard to find anywhere the right table structure needed for session table. As workaround I'm creating the table manually on each of mine Gitea instances (using the query from documentation of go-macaron framework):
Is this a normal behaviour? If not - can u please fix this in future releases (considering that there are no problems with creating all other tables automatically)?
Steps to reproduce