Update xorm to v1 (#323)
Fix limit for databases other than sqlite go mod tidy && go mod vendor Remove unneeded break statements Make everything work with the new xorm version Fix xorm logging Fix lint Fix redis init Fix using id field Fix database init for testing Change default database log level Add xorm logger Use const for postgres go mod tidy Merge branch 'master' into update/xorm # Conflicts: # go.mod # go.sum # vendor/modules.txt go mod vendor Fix loading fixtures for postgres Go mod vendor1 Update xorm to version 1 Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/323
This commit is contained in:
41
vendor/xorm.io/xorm/CONTRIBUTING.md
generated
vendored
41
vendor/xorm.io/xorm/CONTRIBUTING.md
generated
vendored
@ -22,6 +22,47 @@ e.g.,
|
||||
// !lunny! this is comments made by lunny
|
||||
```
|
||||
|
||||
### Build xorm and test it locally
|
||||
|
||||
Once you write some codes on your feature branch, you could build and test locally at first. Just
|
||||
|
||||
```
|
||||
make build
|
||||
```
|
||||
and
|
||||
```
|
||||
make test
|
||||
```
|
||||
|
||||
The `make test` is an alias of `make test-sqlite`, it will run the tests on a sqlite database file. No extra thing needed to do except you need to cgo compile enviroment.
|
||||
|
||||
If you write a new test method, you could run
|
||||
|
||||
```
|
||||
make test-sqlite#TestMyNewMethod
|
||||
```
|
||||
|
||||
that will only run the special test method.
|
||||
|
||||
If you want to run another datase, you have to prepare a running database at first, and then, you could
|
||||
|
||||
```
|
||||
TEST_MYSQL_HOST= TEST_MYSQL_CHARSET= TEST_MYSQL_DBNAME= TEST_MYSQL_USERNAME= TEST_MYSQL_PASSWORD= make test-mysql
|
||||
```
|
||||
|
||||
or other databases:
|
||||
```
|
||||
TEST_MSSQL_HOST= TEST_MSSQL_DBNAME= TEST_MSSQL_USERNAME= TEST_MSSQL_PASSWORD= make test-mssql
|
||||
```
|
||||
```
|
||||
TEST_PGSQL_HOST= TEST_PGSQL_SCHEMA= TEST_PGSQL_DBNAME= TEST_PGSQL_USERNAME= TEST_PGSQL_PASSWORD= make test-postgres
|
||||
```
|
||||
```
|
||||
TEST_TIDB_HOST= TEST_TIDB_DBNAME= TEST_TIDB_USERNAME= TEST_TIDB_PASSWORD= make test-tidb
|
||||
```
|
||||
|
||||
And if your branch is related with cache, you could also enable it via `TEST_CACHE_ENABLE=true`.
|
||||
|
||||
### Patch review
|
||||
|
||||
Help review existing open [pull requests](https://help.github.com/articles/using-pull-requests) by commenting on the code or
|
||||
|
Reference in New Issue
Block a user