Skip to content

Releases: muir/libschema

v0.5.1

10 Aug 21:19
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.5.0...v0.5.1

v0.5.0

26 Jul 05:06
Compare
Choose a tag to compare

What's Changed

  • upgrade mysql; bump go version to 1.20 by @muir in #139

Full Changelog: v0.4.1...v0.5.0

v0.4.1

26 Jul 02:37
Compare
Choose a tag to compare

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

25 Dec 04:16
d434f0d
Compare
Choose a tag to compare

BREAKING CHANGE FOR SINGLESTORE

  • track db_names for mysql and singlestore; breaking change for singlestore by @muir in #63

Full Changelog: v0.3.0...v0.4.0

v0.3.0

24 Dec 22:20
3d48dae
Compare
Choose a tag to compare

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

08 Dec 06:14
ff15962
Compare
Choose a tag to compare

What's Changed

  • BREAKING CHANGE: lsmysql.CheckScript() now returns error by @muir in #54

Full Changelog: v0.1.1...v0.2.0

v0.1.1

08 Dec 04:34
f64702a
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.0...v0.1.1

v0.1.0

28 Oct 03:34
7e44bd3
Compare
Choose a tag to compare

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

29 Apr 05:20
5d6c207
Compare
Choose a tag to compare

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

30 Mar 05:24
df7b259
Compare
Choose a tag to compare

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

Full Changelog: https://github.com/muir/libschema/commits/v0.0.1