migrator

Super fast and lightweight DB migration & evolution tool written in Go

APACHE-2.0 License

Stars
18
Committers
3

Bot releases are hidden (Show)

migrator - v2023.0.1 Latest Release

Published by lukaszbudnik over 1 year ago

This is a maintenance release and includes 42 dependabot pull requests.

The key migrator dependencies and theirs versions are:

  • alpine 3.17.2
  • golang 1.19.3
  • gin-gonic/gin 1.9.0
  • graph-gophers/graphql-go 1.5.0
  • aws/aws-sdk-go 1.44.219
  • Azure/azure-storage-blob-go 0.15.0
  • denisenkom/go-mssqldb 0.12.3
  • go-sql-driver/mysql 1.7.0
  • lib/pq 1.10.7
migrator - v2022.0.1

Published by lukaszbudnik over 2 years ago

This is a maintenance release and includes 17 dependabot pull requests.

Out of 17 closed dependabot pull requests the most important ones are:

  • alpine update to 3.15
  • go update to 1.17.7
  • aws/aws-sdk-go updates to 1.43.2
  • autorest/azure/auth update to 0.5.11
migrator - v2021.2.2

Published by lukaszbudnik almost 3 years ago

This is a maintenance release and includes 16 dependabot pull requests.

Out of 16 closed dependabot pull requests the most important ones are:

  • docker image update to alpine 3.14 and go 1.17.3
  • aws/aws-sdk-go updates from 1.40.45 up to 1.42.9
  • autorest/azure/auth update from v0.5.8 to v0.5.9 - which addresses CVE in crypto dependency more here
  • lib/pq from 1.10.3 to 1.10.4
migrator - v2021.2.1

Published by lukaszbudnik about 3 years ago

This is a maintenance release.

Comes with the following changes:

  • fixed issue with int32 overflow duration in nanoseconds; duration is now float and in (more user-friendly) seconds - #292
  • closed 4 dependabot pull requests
migrator - v2021.2.0

Published by lukaszbudnik about 3 years ago

This release improves observability, tracing, and logging.

Most notable new features are:

  • implemented Prometheus metrics, available at /metrics - #284
  • implemented health checks (Eclipse MicroProfile Health spec), available at /health - #285 and #286
  • added support for logLevel configuration property in migrator.yaml (optional and defaults to INFO)
  • replaced old vet, lint with staticcheck tool
  • increased test coverage to 95%
  • closed 3 dependabot pull requests
migrator - v2021.1.0

Published by lukaszbudnik about 3 years ago

v2021.1.0 is a new minor release which includes the following changes:

  • full go 1.17 support - #273
  • fix for resource exhaustion (by correctly closing rows and executing DDL queries as Exec not Query) - also part of the #273
  • internal performance benchmark tests
migrator - v2021.0.4

Published by lukaszbudnik about 3 years ago

v2021.0.4 is a maintenance release and contains the following changes:

  • fix for not injecting build variables (git ref and git commit sha) during production build (caused by migration from Docker Hub Autobuilds to GitHub actions): #268
  • closed 6 dependabot pull requests
migrator - v2021.0.3

Published by lukaszbudnik about 3 years ago

v2021.0.3 is a maintenance release.

Apart from standard docker image and 3rd party dependencies upgrades the biggest change is to building and releasing images.

  • docker images are now pushed to both docker.com and ghcr.io. There is a change to the image versioning: the semver drops the "v" at the beginning of the docker image tag.
  • closed 8 dependabot pull requests
migrator - v2021.0.2

Published by lukaszbudnik about 3 years ago

v2021.0.2 contains the following changes:

  • Azure Blob loader now supports optional prefixes as a part of the baseLocation config property - #246
  • Azure Blob loader now supports MSI and Token credentials - #247
  • merged 2 dependabot pull requests with go dependencies and docker images updates
migrator - v2021.0.1

Published by lukaszbudnik over 3 years ago

v2021.0.1 contains the following changes:

  • S3 loader now supports optional prefixes as a part of the baseLocation config property - #243
  • merged 61 dependabot pull requests with go dependencies and docker images updates
migrator - v2021.0.0

Published by lukaszbudnik over 3 years ago

v2021.0.0 contains the following changes:

  • removed v1 API - #145 and #148
  • removed deprecated baseDir config property (use baseLocation) - #140
  • fixed possible SQL injection when creating new tenant - #133
  • enabled GitHub dependabot integration, enabled GitHub actions
  • merged 15 dependabot pull requests with go dependencies and docker images updates

See README.md for more information.

migrator - v2020.1.3

Published by lukaszbudnik about 4 years ago

v2020.1.3 contains the following change:

  • a more flexible webhooks support with webHookTemplate configuration property which can be used to customise webhook payload

See README.md for information.

migrator - v2020.1.2

Published by lukaszbudnik about 4 years ago

v2020.1.2 is a maintenance release and contains:

  • go module updates
  • simplifies testing by providing docker-compose and go subtests to tests all 5 containers every time tests are executed
  • [travis] added support for go 1.14 and 1.15 (apart of 1.13)
  • [travis] uses docker-compose to start 5 database containers - also fixes #98
  • [docs] updated and re-organised documentation
migrator - v2020.1.1

Published by lukaszbudnik over 4 years ago

v2020.1.1 comes with the following minor changes:

  • dropping support for go 1.12 due to Azure SDK compile errors
  • migrator timestamp columns now have time zone enabled for PostgreSQL
migrator - v2020.1.0

Published by lukaszbudnik over 4 years ago

Version numbering change

What would have been v5.0 has become v2020.1.0. This change was made primarily to differentiate API version numbering from migrator versioning. Going forward migrator will use a year as a major version number.

API versions

migrator v2020.1.0 supports the following API versions:

  • v1 - REST API
  • v2 - GraphQL

New Features

Latest and greatest features are:

  • DB versioning - every migrator action creates a new DB version. This feature can be used for troubleshooting and tracing DB modifications in dev environments but is also an ideal tool for auditing and compliance. GraphQL API v2: createVersion and createTenant and API v1: POST migrations and POST tenants create a new DB version. However, DB versions are only accessible in API v2. Meaning you can still use API v1 and migrator will create DB versions for you, but you have to use API v2 to access DB versions information;
  • API v2 - GraphQL API - the migrator's API v1 was pretty verbose and was producing sometimes rather big HTTP responses. There were half-measures implemented like response parameter (full - all data, list - list of applied migrations, summary - only summary). With GraphQL you now have a full control over what you want migrator to return. See examples in data package and README.md;
  • API v2 no longer verifies checksums of applied source migrations - the rationale is that once applied source migrations are never re-applied. Further with disabling verification of checksums you can now flatten DB migrations (as a best practice DB migrations/evolutions should be flattened on a regular basis).
migrator - v4.2

Published by lukaszbudnik over 4 years ago

migrator v4.2 comes with the following new features:

  • source migrations loader implementation for Azure Blob Containers #82

    If baseLocation matches ^https://.*\.blob\.core\.windows\.net/.* regex, Azure Blob implementation is used. In such case the baseLocation property is treated as a container URL:

    # Azure Blob container URL
    baseLocation: https://storageaccountname.blob.core.windows.net/mycontainer
    
  • tutorial added to showing how to deploy migrator to Azure AKS (Azure Kubernetes Service)

  • DEPRECATION baseDir is now deprecated in favour of baseLocation. This change was made to better match its purpose now that migrator provides, apart of disk loader, also AWS S3 and Azure Blob loaders. v4.x is fully backward compatible. However migrator will print a WARN message when old config property is used. baseDir will be removed in v5.0.

  • migrator v4.2 switched to go modules for dependency management

migrator - v4.1.2

Published by lukaszbudnik over 4 years ago

migrator v4.1.2 comes with the following new feature:

  • support for pathPrefix was added. Path prefix is used by Application Load Balancers/Application Gateways for application HTTP request routing. For example whenpathPrefix is set to /migrator then all HTTP requests should be prefixed with that path, for example: /migrator/v1/config, /migrator/v1/migrations/source, etc.
migrator - v4.1.1

Published by lukaszbudnik almost 5 years ago

migrator v4.1.1 comes with the following changes:

  • implemented support for response "list" #77
  • fixed verify checksums to not fail when single and tenant scripts have different checksums #78
migrator - v4.1

Published by lukaszbudnik almost 5 years ago

migrator v4.1 comes with the following new feature:

  • source migrations loader implementation for AWS S3 #49

    If baseDir starts with s3:// prefix, AWS S3 implementation is used. In such case the baseDir property is
    treated as a bucket name.

    A sample migrator.yaml with source migrations located in AWS S3 bucket called your-bucket-migrator looks like this:

    baseDir: s3://your-bucket-migrator
    driver: postgres
    dataSource: user=postgres dbname=migrator_test host=127.0.0.1 port=32774 sslmode=disable
    connect_timeout=1
    singleMigrations:
    - migrations/ref
    - migrations/config
    tenantMigrations:
    - migrations/tenants
    
migrator - v4.0.1

Published by lukaszbudnik almost 5 years ago

migrator v4.0.1 comes with the following one small change:

  • migrator returns build information together with supported API versions on "GET /"