Releases: muir/libschema
v0.5.1
What's Changed
- Bump codacy/codacy-analysis-cli-action from 4.3.0 to 4.4.5 by @dependabot in #143
- Bump github/codeql-action from 2.21.5 to 3.25.15 by @dependabot in #144
- Bump ossf/scorecard-action from 2.1.3 to 2.4.0 by @dependabot in #145
- Bump actions/upload-artifact from 3.1.2 to 4.3.4 by @dependabot in #141
- fix rename in readme by @muir in #147
- Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 by @dependabot in #146
- set reviewer for dependabot PRs by @muir in #152
- Bump github/codeql-action from 3.25.15 to 3.26.0 by @dependabot in #151
- Bump actions/upload-artifact from 4.3.4 to 4.3.6 by @dependabot in #150
- Bump step-security/harden-runner from 2.9.0 to 2.9.1 by @dependabot in #149
- fix readme typo by @muir in #153
Full Changelog: v0.5.0...v0.5.1
v0.5.0
v0.4.1
What's Changed
- another singlestore test by @muir in #64
- Bump actions/checkout from 3.2.0 to 3.3.0 by @dependabot in #65
- Bump actions/upload-artifact from 3.1.1 to 3.1.2 by @dependabot in #66
- Bump github/codeql-action from 2.1.37 to 2.1.38 by @dependabot in #67
- Bump step-security/harden-runner from 2.0.0 to 2.1.0 by @dependabot in #68
- Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 by @dependabot in #70
- Bump github/codeql-action from 2.1.38 to 2.2.1 by @dependabot in #72
- Bump github/codeql-action from 2.2.1 to 2.2.2 by @dependabot in #73
- Bump github/codeql-action from 2.2.2 to 2.2.3 by @dependabot in #74
- Bump github/codeql-action from 2.2.3 to 2.2.4 by @dependabot in #75
- Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 by @dependabot in #77
- Bump github/codeql-action from 2.2.4 to 2.2.5 by @dependabot in #78
- Bump step-security/harden-runner from 2.1.0 to 2.2.0 by @dependabot in #76
- Bump codacy/codacy-analysis-cli-action from 4.2.0 to 4.3.0 by @dependabot in #79
- Bump actions/checkout from 3.3.0 to 3.5.0 by @dependabot in #86
- Bump github.com/lib/pq from 1.10.7 to 1.10.8 by @dependabot in #94
- Bump github/codeql-action from 2.2.5 to 2.2.12 by @dependabot in #93
- Bump codecov/codecov-action from 3.1.1 to 3.1.2 by @dependabot in #92
- Bump step-security/harden-runner from 2.2.0 to 2.3.0 by @dependabot in #89
- Bump ossf/scorecard-action from 2.1.2 to 2.1.3 by @dependabot in #88
- Bump actions/setup-go from 3.5.0 to 4.0.0 by @dependabot in #83
- Bump actions/checkout from 3.5.0 to 3.5.2 by @dependabot in #95
- Bump github/codeql-action from 2.2.12 to 2.3.0 by @dependabot in #98
- Bump codecov/codecov-action from 3.1.2 to 3.1.3 by @dependabot in #97
- Bump github.com/go-sql-driver/mysql from 1.7.0 to 1.7.1 by @dependabot in #99
- Bump github.com/lib/pq from 1.10.8 to 1.10.9 by @dependabot in #100
- Bump step-security/harden-runner from 2.3.0 to 2.4.0 by @dependabot in #103
- Bump github/codeql-action from 2.3.0 to 2.21.5 by @dependabot in #129
- Fix github actions for SingleStore and code coverage by @muir in #138
- Bump actions/checkout from 3.5.2 to 4.1.7 by @dependabot in #130
- Bump github.com/stretchr/testify from 1.8.2 to 1.9.0 by @dependabot in #136
- Bump golangci/golangci-lint-action from 3.4.0 to 6.0.1 by @dependabot in #133
- Bump actions/setup-go from 4.0.0 to 5.0.2 by @dependabot in #134
- Bump step-security/harden-runner from 2.4.0 to 2.9.0 by @dependabot in #132
Full Changelog: v0.4.0...v0.4.1
v0.4.0
v0.3.0
What's Changed
- Bump github/codeql-action from 2.1.35 to 2.1.36 by @dependabot in #55
- rename Database.Name -> Database.DBName by @muir in #62
- Bump ossf/scorecard-action from 2.0.6 to 2.1.2 by @dependabot in #61
- Bump github/codeql-action from 2.1.36 to 2.1.37 by @dependabot in #59
- Bump actions/setup-go from 3.4.0 to 3.5.0 by @dependabot in #57
- Bump actions/checkout from 3.1.0 to 3.2.0 by @dependabot in #56
Breaking change
Renaming Database.Name
to Database.DBName
is a breaking change.
Full Changelog: v0.2.0...v0.3.0
v0.2.0
v0.1.1
What's Changed
- add badge for singlestore tests by @muir in #29
- Readme changes by @muir in #30
- [StepSecurity] ci: Harden GitHub Actions by @step-security-bot in #31
- Scorescards by @muir in #33
- Bump actions/setup-go from 2.2.0 to 3.3.1 by @dependabot in #36
- Bump codecov/codecov-action from 2.1.0 to 3.1.1 by @dependabot in #35
- Bump golangci/golangci-lint-action from 2.5.2 to 3.3.0 by @dependabot in #34
- fix badge by @muir in #37
- Bump actions/upload-artifact from 3.0.0 to 3.1.1 by @dependabot in #39
- Bump ossf/scorecard-action from 2.0.3 to 2.0.6 by @dependabot in #38
- remove badge for now by @muir in #40
- remove badge for now by @muir in #41
- fix CI job name by @muir in #46
- Bump golangci/golangci-lint-action from 3.3.0 to 3.3.1 by @dependabot in #45
- Bump github/codeql-action from 1.0.26 to 2.1.30 by @dependabot in #43
- Bump step-security/harden-runner from 1.5.0 to 2.0.0 by @dependabot in #44
- Bump actions/checkout from 2.5.0 to 3.1.0 by @dependabot in #50
- Bump github/codeql-action from 2.1.30 to 2.1.35 by @dependabot in #49
- Bump actions/setup-go from 3.3.1 to 3.4.0 by @dependabot in #48
- Bump codacy/codacy-analysis-cli-action from 1.1.0 to 4.2.0 by @dependabot in #47
- Bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.0 by @dependabot in #51
- upgrade to sqltoken 0.0.5 by @muir in #53
- add some debugging by @muir in #52
New Contributors
- @step-security-bot made their first contribution in #31
Full Changelog: v0.1.0...v0.1.1
v0.1.0
What's Changed
- Bump github.com/stretchr/testify from 1.7.1 to 1.7.2 by @dependabot in #21
- Bump github.com/lib/pq from 1.10.5 to 1.10.6 by @dependabot in #20
- Bump github.com/stretchr/testify from 1.7.2 to 1.7.5 by @dependabot in #23
- Bump github.com/stretchr/testify from 1.7.5 to 1.8.0 by @dependabot in #24
- Bump github.com/lib/pq from 1.10.6 to 1.10.7 by @dependabot in #25
- Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 by @dependabot in #27
- change supported go versions from 1.16-1.18 to 1.17-1.19 by @muir in #28
- Add support for SingleStore by @muir in #26
Full Changelog: v0.0.2...v0.1.0
v0.0.2
What's Changed
- add badges to readme by @muir in #13
- different codecov uploader by @muir in #14
- Bump github.com/go-sql-driver/mysql from 1.5.0 to 1.6.0 by @dependabot in #15
- Fix tests, increase coverage by @muir in #17
- increase test coverage by @muir in #18
- Significant rewrite by @muir in #19
This is a major rewrite of libschema with many changes that are not backwards compatible.
All of the changes that are not compatible will cause compile errors rather than unexpected changes in behavior.
non-backewards compatible changes
logger
libschema.MyLogger has been replaced. There are functions to create the new logger.
For example, to create a postgres database, the old call was:
lspostgres.New(log libschema.MyLogger, name string, schema *libschema.Schema, db *sql.DB)
The new call is:
lspostgres.New(log *internal.Log, name string, schema *libschema.Schema, db *sql.DB)
To provide that new log
, simply wrap what you used previously with libschema.LogFromLogur()
.
Generate
For the Generate
and Computed
migration definition functions in
lsmysql and
lspostgres,
the signature has changed.
The old signatures were:
func Generate(string, func(context.Context, libschema.MyLogger, *sql.Tx) string, ...libschema.MigrationOption) Migration {}
func Computed(string, func(context.Context, libschema.MyLogger, *sql.Tx) error, ...libschema.MigrationOption) Migration {}
The new signatures drop the logger:
func Generate(string, func(context.Context, *sql.Tx) string, ...libschema.MigrationOption) Migration {}
func Computed(string, func(context.Context, *sql.Tx) error, ...libschema.MigrationOption) Migration {}
If you want a logger, pass it in some other way.
Command line options
Libschema no longer defines command line options.
If you want them back, add the following:
import "flag"
import "github.com/muir/nfigure"
nfigure.MustExportToFlagSet(flag.CommandLine, "flag", &libschema.DefautOverrides)
Even with that, --error-if-migrate-needed
has replaced --exit-if-migrate-needed
and
OnMigration{Started,Completed,Failed} callbacks
All of the callbacks to indicate migration status now take an additional parameter:
a *libschema.Database
Other changes
RepeatUntilNoOp
The RepeatUntilNoOp()
migration decorator has been added to make it easier to
write asynchronous migrations that do not impede concurrent database use.
OverrideOptions
The previous command line flags can now be provided as a struct. That struct can be filled
with nfigure or it can be filled manually.
Logger
It is now easier to provide a logger to libschema. You can easily supply one using the
"testing"
package or the "log"
package.
Full Changelog: v0.0.1...v0.0.2
v0.0.1
What's Changed
- Add github actions CI by @muir in #2
- Badges by @muir in #3
- Create codeql-analysis.yml by @muir in #5
- Create codacy-analysis.yml by @muir in #6
- Bump github.com/lib/pq from 1.10.2 to 1.10.3 by @dependabot in #8
- Add support for MySQL by @muir in #1
- add code coverage by @muir in #12
New Contributors
- @dependabot made their first contribution in #8
Full Changelog: https://github.com/muir/libschema/commits/v0.0.1