mirror of
https://github.com/go-gitea/gitea
synced 2025-08-24 18:38:28 +00:00
go-sqlite3 gomod version (#12490)
This commit is contained in:
23
vendor/github.com/go-testfixtures/testfixtures/v3/README.md
generated
vendored
23
vendor/github.com/go-testfixtures/testfixtures/v3/README.md
generated
vendored
@@ -74,7 +74,7 @@ The file would look like this (it can have as many record you want):
|
||||
```
|
||||
|
||||
An YAML object or array will be converted to JSON. It will be stored on a native
|
||||
JSON type like JSONB on PostgreSQL or as a TEXT or VARCHAR column on other
|
||||
JSON type like JSONB on PostgreSQL & CockroachDB or as a TEXT or VARCHAR column on other
|
||||
databases.
|
||||
|
||||
```yml
|
||||
@@ -249,9 +249,9 @@ testfixtures.New(
|
||||
|
||||
## Compatible databases
|
||||
|
||||
### PostgreSQL / TimescaleDB
|
||||
### PostgreSQL / TimescaleDB / CockroachDB
|
||||
|
||||
This package has two approaches to disable foreign keys while importing fixtures
|
||||
This package has three approaches to disable foreign keys while importing fixtures
|
||||
for PostgreSQL databases:
|
||||
|
||||
#### With `DISABLE TRIGGER`
|
||||
@@ -288,7 +288,21 @@ testfixtures.New(
|
||||
)
|
||||
```
|
||||
|
||||
Tested using the [github.com/lib/pq](https://github.com/lib/pq) driver.
|
||||
#### With `DROP CONSTRAINT`
|
||||
|
||||
This approach is implemented to support databases that do not support above
|
||||
methods (namely CockroachDB).
|
||||
|
||||
```go
|
||||
testfixtures.New(
|
||||
...
|
||||
testfixtures.Dialect("postgres"),
|
||||
testfixtures.UseDropConstraint(),
|
||||
)
|
||||
```
|
||||
|
||||
Tested using the [github.com/lib/pq](https://github.com/lib/pq) and
|
||||
[github.com/jackc/pgx](https://github.com/jackc/pgx) drivers.
|
||||
|
||||
### MySQL / MariaDB
|
||||
|
||||
@@ -453,6 +467,7 @@ for the database you want to run tests against:
|
||||
|
||||
```bash
|
||||
task test:pg # PostgreSQL
|
||||
task test:crdb # CockroachDB
|
||||
task test:mysql # MySQL
|
||||
task test:sqlite # SQLite
|
||||
task test:sqlserver # Microsoft SQL Server
|
||||
|
Reference in New Issue
Block a user