366 Commits
Author SHA1 Message Date
zeekayandHanzo Dev 85d7501b1f Build on Go 1.27
go fix applied the modernizers. One rewrite it got wrong is corrected here: a
reverse loop over runes became a range over slices.Backward that bound the index
and the value to the SAME name, which does not compile and would have compared a
rune to an index if it had. The value gets its own name.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-17 06:18:28 -07:00
zeekayandHanzo Dev bfc4b67c2f refactor(datastore): back the datastore migration driver with native hanzo-ds/go, drop clickhouse-go
The datastore:// migration driver is now a self-contained golang-migrate
database.Driver that opens through github.com/hanzo-ds/go (the native
ClickHouse-wire driver registered as the database/sql name "datastore").
The ClickHouse-specific migration logic (multi-statement exec,
schema_migrations DDL, cluster/engine config, Version/SetVersion/Drop/Lock)
is ported directly into database/datastore, so it no longer embeds or
imports the upstream database/clickhouse driver or
github.com/ClickHouse/clickhouse-go.

- Delete database/clickhouse (driver + test + examples) and
  internal/cli/build_clickhouse.go.
- internal/cli/build_datastore.go drops the clickhouse-go blank import.
- go.mod: drop github.com/ClickHouse/clickhouse-go, add
  github.com/hanzo-ds/go v1.0.1; tidy. Zero clickhouse-go in go.mod,
  go.sum, and the module/dependency graph.
- Port the driver test + example migrations under database/datastore
  (integration test requires a live datastore/clickhouse-wire backend).
- Update README, release workflow build tags, bug report template.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-18 18:40:56 -07:00
zeekay 0f12524bc1 Add datastore database driver for Hanzo Datastore
Registers "datastore://" as a URL scheme that delegates to the
ClickHouse driver. This allows golang-migrate to natively connect
to Hanzo Datastore instances without URL rewriting in scripts.
2026-03-03 09:15:21 -08:00
e40cf943ca ci: update golangci-lint to v2 (#1341)
* ci: update golangci-lint to v2

update method:
```
golangci-lint migrate
golangci-lint run --fix
```

and fix the last ones manually

* Apply suggestion from @Copilot

* fix tests

---------

Co-authored-by: Hanzo Dev <[email protected]>
2025-12-14 15:14:46 -08:00
leonklingeleandGitHub 426470006b chore: remove dependency on "hashicorp/go-multierror" (#1322)
* feat: remove dependency on "hashicorp/go-multierror"

It seems the project has been unmainted for quite some time already,
see for example https://github.com/hashicorp/go-multierror/issues/97
and https://github.com/hashicorp/go-multierror/issues/98.
This also removes an uneccessary dependency which slims down the go.mod.

Go as of version 1.20 supports appending errors by specifying
multiple "%w" formatters in the "fmt.Errorf"[^0] function.

[^0]: https://pkg.go.dev/fmt#Errorf

* feat: use errors.Join to combine multiple errors

As an update to the previous commit 59f084ea3be2e7ec9d912c1a311402b1e4c40df6,
use "errors.Join"[^0] instead of multiple "%w" formatters for "fmt.Errorf".

[^0]: https://pkg.go.dev/errors#Join

* chore: bring back unused util.go file as removing it is a breaking change
2025-11-29 11:37:42 -08:00
Harald Nordgren 603fedecd5 revert GenerateAdvisoryLockID 2025-11-11 09:42:53 +01:00
Harald Nordgren 085c3977cf fix linter issues 2025-11-09 16:54:45 +01:00
Roman SharkovandGitHub 34fa67d9f6 Merge pull request #1303 from romshark/master
refactor: Remove go.uber.org/atomic in favor of std sync/atomic
2025-08-20 16:35:25 -07:00
Urban Malc 0876c8cddf Fixed sqlserver not actually getting a lock if lock is already set 2025-04-24 12:14:21 +02:00
Oleksandr Redko fca627ee8e Remove redundant build tags 2025-04-17 23:57:28 +03:00
Alex Zaytsev 55cd25f722 refactor: replace github.com/pkg/errors with stdlib 2025-03-10 13:54:11 +10:00
Jochen SchalandaandGitHub 9d3ba93f0e tests: fix various tests (#1209)
* Remove old versions of MongoDB

Removed:

| Release     | Release Date  | End of Life Date |
|-------------|---------------|------------------|
| MongoDB 3.4 | November 2016 | January 2020     |
| MongoDB 3.6 | November 2017 | April 2021       |
| MongoDB 4.0 | June 2018     | April 2022       |
| MongoDB 4.2 | August 2019   | April 2023       |

Added:

| Release     | Release Date  | End of Life Date |
|-------------|---------------|------------------|
| MongoDB 5.0 | July 2021     | October 2024     |
| MongoDB 6.0 | July 2022     | July 2025        |
| MongoDB 7.0 | August 2023   | August 2026      |
| MongoDB 8.0 | October 2024  | TBD              |

https://www.mongodb.com/legal/support-policy/lifecycles

* test(postgres): run tests with PostgreSQL 17

Add PostgreSQL 17, remove PostgreSQL 12 (EOL since November 21, 2024).

https://www.postgresql.org/support/versioning/

* test(cockroachdb): remove old versions of CockroachDB in tests

Removed:

|       Release       |                Released                |              Maintenance Support             |              Assistance Support              |         Latest        |
|:-------------------:|:--------------------------------------:|:--------------------------------------------:|:--------------------------------------------:|:---------------------:|
| 2.1                 | 6 years ago (30 Oct 2018)              | Ended 5 years ago (30 Oct 2019)              | Ended 4 years and 7 months ago (30 Apr 2020) | 2.1.11 (22 Jan 2020)  |
| 2.0                 | 6 years and 8 months ago (04 Apr 2018) | Ended 5 years and 8 months ago (04 Apr 2019) | Ended 5 years ago (04 Oct 2019)              | 2.0.7 (28 Nov 2018)   |
| 1.1                 | 7 years ago (12 Oct 2017)              | Ended 6 years ago (12 Oct 2018)              | Ended 5 years and 8 months ago (12 Apr 2019) | 1.1.9 (01 Oct 2018)   |
| 1.0                 | 7 years ago (10 May 2017)              | Ended 6 years ago (10 May 2018)              | Ended 6 years ago (10 Nov 2018)              | 1.0.7 (11 Feb 2018)   |

Added:

|       Release       |                Released                |              Maintenance Support             |              Assistance Support              |         Latest        |
|:-------------------:|:--------------------------------------:|:--------------------------------------------:|:--------------------------------------------:|:---------------------:|
| 24.3                | 3 weeks ago (18 Nov 2024)              | Ends in 11 months (18 Nov 2025)              | Ends in 1 year and 5 months (18 May 2026)    | 24.3.0 (20 Nov 2024)  |
| 24.2                | 3 months and 4 weeks ago (12 Aug 2024) | Ends in 2 months (12 Feb 2025)               | Ends in 2 months (12 Feb 2025)               | 24.2.5 (11 Nov 2024)  |
| 24.1 (Upcoming LTS) | 6 months and 3 weeks ago (20 May 2024) | Ends in 5 months (20 May 2025)               | Ends in 11 months (20 Nov 2025)              | 24.1.7 (11 Nov 2024)  |
| 23.2 (Upcoming LTS) | 10 months ago (05 Feb 2024)            | Ends in 1 month and 4 weeks (05 Feb 2025)    | Ends in 7 months and 4 weeks (05 Aug 2025)   | 23.2.16 (13 Nov 2024) |

* test(firebird): remove old versions of Firebird in tests

Removed: Firebird 2.5, see https://firebirdsql.org/en/discontinued-versions/

Added:
- Firebird 4.0 (https://firebirdsql.org/en/firebird-4-0-5/)
- Firebird 5.0 (https://firebirdsql.org/en/firebird-5-0-1/)

* test(clickhouse): run ClickHouse tests with official LTS image (24.8)
2025-02-19 16:19:12 -08:00
Dale Hui 64b02ed2d7 linter fixes 2025-01-26 17:04:55 -08:00
Dale Hui 797848a55c Drop support for Azure SQL Edge
Will be retired on 9/30/2025 and CI tests using the docker image have been flakey
https://azure.microsoft.com/en-us/updates?id=azure-sql-edge-retirement
2025-01-26 16:43:31 -08:00
Dale HuiandGitHub 242d80d406 Fix CI (#1222)
* Run go mod tidy

* Fix Github linting action

Changes:
* checkout before setting up go
* pin golangci-lint version

* Update supported db versions

* Use start-single-node instead of start for cockroachdb
2025-01-26 15:46:11 -08:00
Dale HuiandGitHub 04e113ba59 Merge pull request #1127 from joschi/tests-mysql-9
test(mysql): run tests with MySQL 8.0, 8.4, and 9.0
2024-09-07 22:59:58 -07:00
Jochen Schalanda e57f9d578f test(postgres): run tests with PostgreSQL 16 2024-09-07 21:47:48 +02:00
Jochen Schalanda 17915e9106 test(mysql): run tests with MySQL 8.0, 8.4, and 9.0 2024-09-07 21:47:28 +02:00
Dale Hui ccfc4196f3 Use forked version of postgres 8 to avoid Docker image format version issues.
See: https://docs.docker.com/engine/deprecated/#pushing-and-pulling-with-image-manifest-v2-schema-1

Forked images created by pulling the original image and pushing to the fork. For more details, see: https://github.com/golang-migrate/migrate/pull/1143#issuecomment-2328069381
2024-09-05 23:28:26 -07:00
Dale Hui 2fba816aeb Fix redshift tests
Newer versions of postgres require a password
2024-09-05 23:26:56 -07:00
Mateusz Nowotyński 6545d65813 Make MySQL SetVersion compatible with sql_safe_update 2024-04-19 09:34:12 +02:00
Dale HuiandGitHub 68d4d6ca54 Merge pull request #1068 from goodfirm/master
chore: fix some typos in comments
2024-04-16 23:16:25 -07:00
Dale Hui 76d2af2e01 Cleanup sqlserver images after tests run 2024-04-15 22:42:34 -07:00
Dale Hui 6d78bc58cf Cleanup mongodb images after tests run 2024-04-15 00:35:46 -07:00
Dale Hui 54382654a0 Cleanup yugabytedb images after tests run 2024-04-15 00:25:40 -07:00
Dale Hui 1bd6eb130a Cleanup cassandra images after tests run 2024-04-15 00:18:13 -07:00
Dale Hui bcc589c6d9 Cleanup postgres images after tests run 2024-04-15 00:17:36 -07:00
goodfirm 0d5750825c chore: fix some typos in comments
Signed-off-by: goodfirm <[email protected]>
2024-04-10 14:36:41 +08:00
Dale HuiandGitHub e7832e3f78 Merge pull request #1061 from occupyhabit/master
chore: fix some typos
2024-03-24 22:31:39 -07:00
Dale Hui f2b1e3957f Update yugabyte test images 2024-03-24 22:30:38 -07:00
occupyhabit c5009bf7e8 chore: fix some typos
Signed-off-by: occupyhabit <[email protected]>
2024-03-23 21:49:28 +08:00
Alex Kucksdorf 64d58a0983 [sqlserver] Always access version table with explicit schema 2023-12-25 10:29:27 +01:00
Alex Kucksdorf 6e19f77415 [sqlserver] Ensure version table in provided schema
Closes #839
2023-12-25 10:29:26 +01:00
Dale HuiandGitHub 05af911423 Merge pull request #992 from fortnox-andreas/master
Add support for locking table in pgx-driver
2023-12-20 14:13:36 -08:00
Dale Hui 7fd69d037c Only test against YugabyteDB LTS releases 2023-12-20 12:49:33 -08:00
Tommy Karlsson a2add7634e Quote locktable from config in queries
Defer rollback of transactions
2023-12-20 16:10:29 +01:00
Dale HuiandGitHub 051e46c72f Merge branch 'master' into clickhouse_create_database_migrations 2023-12-20 00:33:47 -08:00
Dale Hui 5e9ebd0954 Reformat ScyllaDB/Cassandra docs 2023-12-20 00:28:14 -08:00
Dale HuiandGitHub 227d13532f Merge pull request #947 from mkorolyov/scylladb_support
add tests for scylladb. add scylladb to docs
2023-12-20 00:19:19 -08:00
Dale HuiandGitHub 34ab4d6970 Merge branch 'master' into master 2023-12-19 23:01:18 -08:00
Dale HuiandGitHub fc5f89241d Merge branch 'master' into scylladb_support 2023-12-19 22:56:40 -08:00
Dale HuiandGitHub 23f44fbea0 Merge pull request #999 from tobyscott25/patch-1
Add syntax highlighting to Postgres example
2023-12-19 21:38:57 -08:00
Erik Swenson ab9394a113 Merge remote-tracking branch 'upstream/master' 2023-12-19 10:41:12 -07:00
Erik Swenson f00c8075b6 add 8.11 and 8.12 versions and remove debug logging 2023-12-19 10:33:43 -07:00
Dale Hui 97009bec75 New release prep
* Update dktest from v0.3.16 to v0.4.0 to fix docker vulnerability
* Fix linter issues
* Update outdated GitHub Actions
2023-12-18 23:44:05 -08:00
Erik Swenson 189e56d30c update rqlite 8 container version to 8.0.6 2023-12-14 09:13:13 -07:00
Erik Swenson ec493f2966 Add rqlite 8.0.0 to tested database versions 2023-12-06 16:02:36 -07:00
Erik Swenson 16ed492fcf feature: add rqlite support 2023-11-27 17:05:24 -07:00
Toby ScottandGitHub 4f2aa4058a Add syntax highlighting to Postgres example 2023-11-04 12:24:32 +11:00
Tommy Karlsson 954c3ef916 Added documentation and test for lock strategy 2023-09-20 14:27:26 +02:00