summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-testfixtures/testfixtures/v3/README.md
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2020-08-13 21:54:46 -0400
committerGitHub <noreply@github.com>2020-08-14 09:54:46 +0800
commit8a0049bb033c8080f7a4b97b191ee5dc598b9bcb (patch)
treefd47c157d7ad514bb441c13e8b07a7fc9b6d64db /vendor/github.com/go-testfixtures/testfixtures/v3/README.md
parentb37c7dd384ab24b4781bc5d4a5e1f56e5b46bcee (diff)
downloadgitea-8a0049bb033c8080f7a4b97b191ee5dc598b9bcb.tar.gz
gitea-8a0049bb033c8080f7a4b97b191ee5dc598b9bcb.zip
go-sqlite3 gomod version (#12490)
Diffstat (limited to 'vendor/github.com/go-testfixtures/testfixtures/v3/README.md')
-rw-r--r--vendor/github.com/go-testfixtures/testfixtures/v3/README.md23
1 files changed, 19 insertions, 4 deletions
diff --git a/vendor/github.com/go-testfixtures/testfixtures/v3/README.md b/vendor/github.com/go-testfixtures/testfixtures/v3/README.md
index 56ca8aa455..3b3b7e8bb6 100644
--- a/vendor/github.com/go-testfixtures/testfixtures/v3/README.md
+++ b/vendor/github.com/go-testfixtures/testfixtures/v3/README.md
@@ -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