Merge branch 'master' into mongodb-driver

This commit is contained in:
Dale Hui 2019-01-07 22:50:51 -08:00 committed by GitHub
commit fc8d57d128
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 10 deletions

View File

@ -44,7 +44,7 @@ after_success:
- goveralls -service=travis-ci -coverprofile /tmp/coverage/combined.txt - goveralls -service=travis-ci -coverprofile /tmp/coverage/combined.txt
- make list-external-deps > dependency_tree.txt && cat dependency_tree.txt - make list-external-deps > dependency_tree.txt && cat dependency_tree.txt
- make build-cli - make build-cli
- gem install --no-ri --no-rdoc fpm - gem install --no-document fpm
- fpm -s dir -t deb -n migrate -v "$(git describe --tags 2>/dev/null | cut -c 2-)" --license MIT -m dhui@users.noreply.github.com --url https://github.com/golang-migrate/migrate --description='Database migrations' -a amd64 -p migrate.$(git describe --tags 2>/dev/null | cut -c 2-).deb --deb-no-default-config-files -f -C cli/build migrate.linux-amd64=/usr/local/bin/migrate - fpm -s dir -t deb -n migrate -v "$(git describe --tags 2>/dev/null | cut -c 2-)" --license MIT -m dhui@users.noreply.github.com --url https://github.com/golang-migrate/migrate --description='Database migrations' -a amd64 -p migrate.$(git describe --tags 2>/dev/null | cut -c 2-).deb --deb-no-default-config-files -f -C cli/build migrate.linux-amd64=/usr/local/bin/migrate
deploy: deploy:
@ -124,6 +124,7 @@ deploy:
tags: true tags: true
- provider: script - provider: script
script: ./docker-deploy.sh script: ./docker-deploy.sh
skip_cleanup: true
on: on:
go: "1.11.x" go: "1.11.x"
repo: golang-migrate/migrate repo: golang-migrate/migrate

6
Gopkg.lock generated
View File

@ -255,12 +255,12 @@
version = "v1.39.0" version = "v1.39.0"
[[projects]] [[projects]]
digest = "1:adea5a94903eb4384abef30f3d878dc9ff6b6b5b0722da25b82e5169216dfb61" digest = "1:ec6f9bf5e274c833c911923c9193867f3f18788c461f76f05f62bb1510e0ae65"
name = "github.com/go-sql-driver/mysql" name = "github.com/go-sql-driver/mysql"
packages = ["."] packages = ["."]
pruneopts = "UT" pruneopts = "UT"
revision = "d523deb1b23d913de5bdada721a6071e71283618" revision = "72cd26f257d44c1114970e19afddcd812016007e"
version = "v1.4.0" version = "v1.4.1"
[[projects]] [[projects]]
digest = "1:586ea76dbd0374d6fb649a91d70d652b7fe0ccffb8910a77468e7702e7901f3d" digest = "1:586ea76dbd0374d6fb649a91d70d652b7fe0ccffb8910a77468e7702e7901f3d"

View File

@ -1,4 +1,4 @@
[![Build Status](https://img.shields.io/travis/golang-migrate/migrate/master.svg)](https://travis-ci.org/golang-migrate/migrate) [![Build Status](https://img.shields.io/travis/com/golang-migrate/migrate/master.svg)](https://travis-ci.com/golang-migrate/migrate)
[![GoDoc](https://godoc.org/github.com/golang-migrate/migrate?status.svg)](https://godoc.org/github.com/golang-migrate/migrate) [![GoDoc](https://godoc.org/github.com/golang-migrate/migrate?status.svg)](https://godoc.org/github.com/golang-migrate/migrate)
[![Coverage Status](https://img.shields.io/coveralls/github/golang-migrate/migrate/master.svg)](https://coveralls.io/github/golang-migrate/migrate?branch=master) [![Coverage Status](https://img.shields.io/coveralls/github/golang-migrate/migrate/master.svg)](https://coveralls.io/github/golang-migrate/migrate?branch=master)
[![packagecloud.io](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/golang-migrate/migrate?filter=debs) [![packagecloud.io](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/golang-migrate/migrate?filter=debs)

View File

@ -175,7 +175,7 @@ func (ch *ClickHouse) ensureVersionTable() error {
// if not, create the empty migration table // if not, create the empty migration table
query = ` query = `
CREATE TABLE ` + ch.config.MigrationsTable + ` ( CREATE TABLE ` + ch.config.MigrationsTable + ` (
version UInt32, version Int64,
dirty UInt8, dirty UInt8,
sequence UInt64 sequence UInt64
) Engine=TinyLog ) Engine=TinyLog

View File

@ -48,17 +48,19 @@ func ParallelTest(t *testing.T, versions []Version, readyFn IsReadyFunc, testFn
defer container.Remove() defer container.Remove()
// wait until database is ready // wait until database is ready
tick := time.Tick(1000 * time.Millisecond) tick := time.NewTicker(1000 * time.Millisecond)
timeout := time.After(time.Duration(timeout) * time.Second) defer tick.Stop()
timeout := time.NewTimer(time.Duration(timeout) * time.Second)
defer timeout.Stop()
outer: outer:
for { for {
select { select {
case <-tick: case <-tick.C:
if readyFn(container) { if readyFn(container) {
break outer break outer
} }
case <-timeout: case <-timeout.C:
t.Fatalf("Docker: Container not ready, timeout for %v.\n%s", version, containerLogs(t, container)) t.Fatalf("Docker: Container not ready, timeout for %v.\n%s", version, containerLogs(t, container))
} }
} }