• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

golang-migrate / migrate / 716
54%

Build:
DEFAULT BRANCH: master
Ran 11 Mar 2020 12:21AM UTC
Jobs 2
Files 41
Run time 76min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Mar 2020 11:59PM UTC coverage: 53.191% (+0.7%) from 52.509%
716

push

travis-ci-com

web-flow
Improved migration creation + Windows fix (#352)

* CLI: Improve migration creation.

* Validates migration version on creation, to avoid creation of duplicated versions
* Uses `os.OpenFile` with `O_CREATE|O_EXCL` to create files to avoid file collisions
* Uses `filepath.Join` to concatenate paths, making `cleanPath()` not necessary
* Prints generated filenames
* Fixes #238
* Supersedes #250

* CLI: change `createCmd` to return error and accept `print` parameter

* feat: print out an abs path

Better for Windows OS when specify -dir as /subdir, user will see C:/subdir/0001_name.up.sql rather than /subdir/0001_name.up.sql

* test: fixed abs path test fail for OS Windows

abs path tests fails because filepath.IsAbs() treats `/subdir` path as invalid abs path at windows when drive letter is not present

* feat: print absolute path for created files

Better for Windows OS systems where `/path` can be interpreted in different ways depending on working dir

* test: corrected tests for OS Windows

OS Windows has different interpretation of `/path`, it depends on working dir.
If working dir D:\test it interprets `/path` as `D:\path`

* test: fixed `dir invalid` test

Linux OS has less restriction on a filepath than Windows, so path invalid in windows is perfectly valid for Linux. The only invalid dir name in Linux is one ending with null string terminator (\000)

* refac(cli): *Cmd() now returns an error and not uses log.fatalErr(err)

* docs: added godoc, migarate usage updated

* refac(cli): code refactored

* refac: removed unnecessary path covert

* docs: comment added

* test: fixed code review issue, noErrorExpected var removed

https://github.com/golang-migrate/migrate/pull/352#discussion_r389409789

* docs: fixed godoc

Co-authored-by: Kiyoshi '13k' Murata <kbmurata@gmail.com>

122 of 122 new or added lines in 2 files covered. (100.0%)

2559 of 4811 relevant lines covered (53.19%)

33.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 716.1 (GO111MODULE=on MIGRATE_TEST_CONTAINER_BOOT_TIMEOUT=60 DOCKER_USERNAME=golangmigrate DOCKER_PASSWORD=[secure]) 11 Mar 2020 12:21AM UTC 0
53.19
Travis Job 716.1
2 716.2 (GO111MODULE=on MIGRATE_TEST_CONTAINER_BOOT_TIMEOUT=60 DOCKER_USERNAME=golangmigrate DOCKER_PASSWORD=[secure]) 11 Mar 2020 01:37AM UTC 0
53.19
Travis Job 716.2
Source Files on build 716
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #716
  • 8e142dfa on github
  • Prev Build on master (#713)
  • Next Build on master (#723)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc