aboutsummaryrefslogtreecommitdiff
path: root/internal/db/db.go
Commit message (Collapse)AuthorAge
* db: migrate `admin.go` to `notices.go` with GORM (#7536)Joe Chen2023-08-23
|
* refactor(db): migrate off `user_email.go` to `users.go` (#7452)Joe Chen2023-05-14
|
* refactor(db): merge relation stores into entity stores (#7341)Joe Chen2023-02-08
|
* refactor(db): migrate methods off `user.go` (#7336)Joe Chen2023-02-05
|
* all: replace `interface{}` with `any` (#7330)Joe Chen2023-02-02
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* refactor(db): migrate methods off and delete deprecated methods from ↵Joe Chen2022-11-05
| | | | `user.go` (#7231)
* refactor(db): migrate methods off `user.go` and `org.go` (#7219) (#7227)Joe Chen2022-11-05
|
* refactor(db): migrate methods off `user.go` (#7219)Joe Chen2022-10-30
|
* refactor(db): migrate `Follow` off `user.go` (#7203)Joe Chen2022-10-23
|
* db: refactor "action" table to use GORM (#7054)Joe Chen2022-06-25
| | | Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* db: skip auto migrate for existing "version" table (#7057)Joe Chen2022-06-14
|
* migrations: add tests and remove XORM (#7050)Joe Chen2022-06-12
|
* db: use `context` and go-mockgen for `ReposStore` (#7046)Joe Chen2022-06-11
|
* access_token: encrypt access token with SHA256 (#7008)E99p1ant2022-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * access_token: encrypt access token with SHA256 * revert list access token * fix lint * generate schemadoc * add database migrations * fix tests * fix tests * add test case for access token golden * fix test in postgres * `Sha256` -> `SHA256` * Use GORM for migration * task generate-schemadoc * Use unique * change migration name * allow read * task generate-schemadoc * add changelog * fix lint error * update changelog * remove Debug * add comments Co-authored-by: Joe Chen <jc@unknwon.io>
* db: run tests with pure-Go SQLite (#6998)Joe Chen2022-06-03
|
* ci: run database tests against Postgres, MySQL and SQLite (#6996)Joe Chen2022-06-01
|
* database: add PostgreSQL custom schema support (#6695)zvrh2022-01-05
| | | | | Co-authored-by: Homura37 <git@gvip.xyz> Co-authored-by: Homura <16538800+Homura37@users.noreply.github.com> Co-authored-by: Joe Chen <jc@unknwon.io>
* build(deps): bump gorm.io/gorm from 1.20.6 to 1.20.7 (#6425)dependabot-preview[bot]2020-11-28
| | | | | | | | | | | | | | * build(deps): bump gorm.io/gorm from 1.20.6 to 1.20.7 Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.20.6 to 1.20.7. - [Release notes](https://github.com/go-gorm/gorm/releases) - [Commits](https://github.com/go-gorm/gorm/compare/v1.20.6...v1.20.7) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Fix compile error Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
* db: migrate access table to use GORM (#6371)ᴜɴᴋɴᴡᴏɴ2020-10-06
|
* cmd/serv: use different log files for ORMs in hook mode (#6361)ᴜɴᴋɴᴡᴏɴ2020-09-29
|
* db: create new session for MySQL after changing attribute (#6338)ᴜɴᴋɴᴡᴏɴ2020-09-18
|
* schemadoc: add go:generate to output database schema (#6310)ᴜɴᴋɴᴡᴏɴ2020-09-06
| | | | | | | * schemadoc: add go:generate to output database schema * Check errors * Revert string renames
* db: migrate to GORM v2 (#6309)ᴜɴᴋɴᴡᴏɴ2020-09-06
|
* db: use GORM to backup and restore non-legacy tables (#6142)ᴜɴᴋɴᴡᴏɴ2020-05-04
|
* db: only use `AutoMigrate` to create new tables (#6092)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | * Only use AutoMigrate to create new tables * Revert models.go
* login_source: migrate to GORM and add tests (#6090)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | | | | | | | | | | | | | * 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
* db: add tests for LFS (#6087)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | * Improve DB test setup * Discard GORM logs in non-verbose mode * Add tests to lfs * Fix data race
* access_token: migrate to GORM and add tests (#6086)ᴜɴᴋɴᴡᴏɴ2020-04-11
| | | | | | | | | * access_token: migrate to GORM * Add tests * Fix tests * Fix test clock
* db: add tests for helper functions (#6084)ᴜɴᴋɴᴡᴏɴ2020-04-10
|
* lfs: implement HTTP routes (#6035)ᴜɴᴋɴᴡᴏɴ2020-04-04
* Bootstrap with GORM * Fix lint error * Set conn max lifetime to one minute * Fallback to use gorm v1 * Define HTTP routes * Finish authentication * Save token updated * Add docstring * Finish authorization * serveBatch rundown * Define types in lfsutil * Finish Batch * authutil * Finish basic * Formalize response error * Fix lint errors * authutil: add tests * dbutil: add tests * lfsutil: add tests * strutil: add tests * Formalize 401 response