* DBContext is just a Context
This PR removes some of the specialness from the DBContext and makes it context
This allows us to simplify the GetEngine code to wrap around any context in future
and means that we can change our loadRepo(e Engine) functions to simply take contexts.
Signed-off-by: Andrew Thornton <[email protected]>
* fix unit tests
Signed-off-by: Andrew Thornton <[email protected]>
* another place that needs to set the initial context
Signed-off-by: Andrew Thornton <[email protected]>
* avoid race
Signed-off-by: Andrew Thornton <[email protected]>
* change attachment error
Signed-off-by: Andrew Thornton <[email protected]>
The DB session clean up needs to check expiry not created_unix.
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: 6543 <[email protected]>
* Create Xorm session provider
This PR creates a Xorm session provider which creates
the appropriate Session table for macaron/session.
Fix#7137
Signed-off-by: Andrew Thornton <[email protected]>
* extraneous l
Signed-off-by: Andrew Thornton <[email protected]>
* fix lint
Signed-off-by: Andrew Thornton <[email protected]>
* use key instead of ID to be compatible with go-macaron/session
Signed-off-by: Andrew Thornton <[email protected]>
* And change the migration too.
Signed-off-by: Andrew Thornton <[email protected]>
* Update spacing of imports
Co-authored-by: 6543 <[email protected]>
* Update modules/session/xorm.go
Co-authored-by: techknowlogick <[email protected]>
* add xorm provider to the virtual provider
Signed-off-by: Andrew Thornton <[email protected]>
* prep for master merge
* prep for merge master
* As per @lunny
* move migration out of the way
* Move to call this db session as per @lunny
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: 6543 <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>