Skip to content

Commit

Permalink
v3.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andreynering committed May 1, 2023
1 parent 29561bb commit a2bb39e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## v3.9.0 - 2023-05-01

- Added support do ClickHouse
([#51](https://github.com/go-testfixtures/testfixtures/issues/51), [#162](https://github.com/go-testfixtures/testfixtures/pull/162) by @titusjaka, [#115](https://github.com/go-testfixtures/testfixtures/pull/115) by @shumorkiniv, [#81](https://github.com/go-testfixtures/testfixtures/pull/81) by @kangoo13).
- Add option to disable database cleanup
([#161](https://github.com/go-testfixtures/testfixtures/pull/161)).
- Start releasing binaries for Mac M1
([#149](https://github.com/go-testfixtures/testfixtures/issues/149), [#150](https://github.com/go-testfixtures/testfixtures/pull/150)).
- Upgraded to Go v1.20
([#165](https://github.com/go-testfixtures/testfixtures/pull/165)).
- Upgraded several dependencies.

## v3.8.1 - 2022-08-01

- Upgrade `golang.org/x/crypto` dependency that includes a security fix
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,18 @@ testfixtures.New(
)
```

## Disable cleanup

If you want to disable cleanup, you can also do like below.
This is usually not recommended, and should be used mostly for debugging.

```go
testfixtures.New(
...
testfixtures.DangerousSkipCleanupFixtureTables(),
)
```

## Sequences

For PostgreSQL and MySQL/MariaDB, this package also resets all
Expand All @@ -299,6 +311,19 @@ testfixtures.New(
)
```

## Force `DELETE FROM ...` on ClickHouse

By default, when using ClickHouse, this library will use `TRUNCATE ...` to
clean the database. If you want to force the use of `DELETE FROM ...` you can
do it by doing:

```go
testfixtures.New(
...
testfixtures.ClickhouseUseDeleteFrom(),
)
```

## Compatible databases

### PostgreSQL / TimescaleDB / CockroachDB
Expand Down Expand Up @@ -404,6 +429,15 @@ testfixtures.New(
Tested using the `mssql` and `sqlserver` drivers from the
[github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) lib.

### ClickHouse

```go
testfixtures.New(
...
testfixtures.Dialect("clickhouse"),
)
```

## Templating

Testfixtures supports templating, but it's disabled by default. Most people
Expand Down

0 comments on commit a2bb39e

Please sign in to comment.