Commit Graph

13 Commits

Author SHA1 Message Date
Joe Chen
c53a1998c5 all: replace interface{} with any (#7330)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2023-02-02 21:25:25 +08:00
Joe Chen
1905b19ee7 refactor(db): migrate methods off user.go (#7219) 2022-10-30 23:04:24 +08:00
Joe Chen
f6acc4763e test(db): add missing tests (#7208) 2022-10-23 21:53:11 +08:00
Joe Chen
083c3ee659 db: refactor "action" table to use GORM (#7054)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2022-06-25 18:07:39 +08:00
Joe Chen
b772603d78 migrations: add tests and remove XORM (#7050) 2022-06-12 14:15:01 +08:00
Joe Chen
f837ea6346 db: use context and go-mockgen for UsersStore (#7042) 2022-06-11 09:42:17 +08:00
Joe Chen
9776bdc9b8 db: use context and go-mockgen for login sources (#7041) 2022-06-10 19:54:36 +08:00
Joe Chen
5f34265db6 ci: run database tests against Postgres, MySQL and SQLite (#6996) 2022-06-01 22:51:46 +08:00
ᴜɴᴋɴᴡᴏɴ
3af91d7cfd auth: decouple types and functions from db (#6320) 2020-09-20 11:19:02 +08:00
ᴜɴᴋɴᴡᴏɴ
519e59b577 db: migrate to GORM v2 (#6309) 2020-09-06 10:11:08 +08:00
ᴜɴᴋɴᴡᴏɴ
9bb218734c db: use GORM to backup and restore non-legacy tables (#6142) 2020-05-04 16:25:57 +08:00
ᴜɴᴋɴᴡᴏɴ
9d64d222a8 db: add tests for users (#6116)
* Add new methods

* Use Users.Create to replace previous hack

* Reduce side effect

* Do not clear tables when test failed

* test_users_Authenticate

* Rename constant

* test_users_Create

* test_users_GetByEmail

* test_users_GetByID

* test_users_GetByUsername
2020-04-18 12:07:30 +08:00
ᴜɴᴋɴᴡᴏɴ
41f56ad05d login_source: migrate to GORM and add tests (#6090)
* Use GORM in all write paths

* Migrate to GORM

* Fix lint errors

* Use GORM  to init table

* dbutil: make writer detect error

* Add more tests

* Rename to clearTables

* db: finish adding tests

* osutil: add tests

* Fix load source files path
2020-04-11 20:18:05 +08:00