16 Commits
Author SHA1 Message Date
zeekay daee3030ce State a version once
A version written into a manifest is written into every manifest that wants it,
which is how eslint came to exist in a hundred and four forms across this estate
and how a package came to resolve twice at run time. The catalog moves the number
out of the manifest: a manifest names the package, the workspace names the
version.

Four are held below their latest because the newer release cannot be used, and
the reason is recorded rather than the version alone: @noble/hashes 2 renamed
every subpath the web3 stack imports, @splinetool/runtime 2 depends on a package
that was never published, @dynamic-labs 5.4.1 the same, and react-resizable-panels
3 points its types condition at the bundle.
2026-08-29 13:46:58 -07:00
Eng Zer Jun 1a301f2273 test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <[email protected]>
2022-02-09 09:37:48 +08:00
BenandGitHub 259d067f40 sqlite3: Fix error when path to database contains whitespace (#500) 2021-01-28 23:36:56 -08:00
Saj Goonatilleke 5dd66dbe1c sqlite3: Explicitly reject invalid x-no-tx-wrap values 2020-03-02 22:28:18 +11:00
Saj Goonatilleke 5d3b421a8a sqlite3: Allow users to disable implicit transactions
An sqlite3 database may be opened with the x-no-tx-wrap=true query
parameter if the user would prefer to retain full control over the
bounds of their transactions.  With x-no-tx-wrap enabled, migrations
should contain explicit BEGIN and COMMIT statements.  This (optional)
behaviour for the sqlite3 driver is consistent with the default
behaviour for other drivers.

Fixes #346.
2020-02-29 05:14:59 +11:00
Dale Hui fc9600340b Remove unnecessary byte slice arg from TestMigrate() in database/testing 2020-01-03 00:15:52 -08:00
Dale Hui d77bd982a2 Fix broken sqlite tests
Since v4.3.0, Migrate.Drop() no longer recreates the migrate schema version table.
See: https://github.com/golang-migrate/migrate/releases/tag/v4.3.0
2019-06-21 00:15:01 -07:00
Kirill MuratovandDale Hui 8afa5fa221 Enabled maligned, staticcheck and errcheck linters (#206)
* Enabled maligned check

* Enabled staticcheck

* Fixes for golint

* Enabled errcheck linter

* Added fixes for error check

* Added errcheck for tests

* Fixed test

* Increased golangci-lint deadline for travis

* Increased golangci-lint deadline for travis

* Decreased golangci-lint deadline for travis

* Revert for backward compatibility

* Using log.Println() instead of fmt.Println()

* Handling os.RemoveAll() errors

* Using t.Error(error) instead of t.Errorf("%v", err)

* Using t.Fatal(error) instead of t.Fatalf("%v", err)

* Using fmt.Sprint(sum) instead of t.Srintf("%v", sum)

* Refactoring

* Revert for backward compatibility

* Revert

* go mod tidy

* Added error logging

* Added error logging

* Added error handling

* Added error handling

* Added error logging

* Fix error logging

* Added error handling

* Fix

* Added logging for migr.Buffer()

* Fixes

* Firebird test disabled

* Fixed nolint comment

* Updated firebird docker image version

* Disabled test for firebird 2.5

* Fixed // nolint
2019-04-26 15:47:16 -07:00
Lukas JoergensenandDale Hui 1cc735c192 postgres: Move lock out of ensureVersionTable, for consistency with other SQL operations (#173)
* Consistently lock in ensureVersionTable and do not call ensureVersionTable from Drop across all database implementations

* Add test for dropping postgres databases

* Fix failing database tests

* Fix CockroachDb test, lock table should be created before versionTable

* Add Initialize() to Driver interface, and add integration tests for Drop() between database implementations and migrate

* Remove Initialize, document breaking behaviour of Drop

* Revert introduction of Initialize method

* Removed Initialize in Stub as well

* Remove call to non-existent Initialize and make sure to close re-initialized database connections

* Revert changes to TestDrop in database/testing

* Split Test and TestMigrate into different test entrypoints

* Remove unused import in migrate_testing

* Remove erroneous code to fix tests

* Add stub source imports to database tests

* Add Stub source to migrate tests

* Use example migrations for tests

* Add file driver to database tests

* Align database directory layout

* Add file source driver to Cassandra

* Review changes

* Minor syntactic change for cleaner diff
2019-02-26 15:56:57 -08:00
hbc 5730c49449 sqlite3: fix wrong schema table usage
fixes: https://github.com/golang-migrate/migrate/issues/165
2019-02-02 13:22:40 +08:00
Dale Hui e2a6017efd Use v4 for Go module support 2018-10-10 16:16:23 -07:00
Dale Hui 2b1b184f7f Revert "Remove support for Go modules"
This reverts commit 781565f251.
2018-10-10 16:15:33 -07:00
Dale Hui 781565f251 Remove support for Go modules 2018-10-10 13:34:03 -07:00
Dale Hui 898723524b Fix module support by opting in to modules 2018-09-14 01:14:42 -07:00
Dale Hui 75bf87f76c Update imports to reference fork.
Thanks `make rewrite-import-paths`!
2018-01-19 10:56:55 -08:00
maxvw 43b718bec6 adapted the sqlite driver for v3 (#165) 2017-05-27 08:58:01 +02:00