Closed
Conversation
Get default URL from environment variable MIGRATE_URL
Added a unit test to demonstrate the problem in issue #45 The introduced makeFiles() function could be used to simplify the other tests too, but I didn't touch more than necessary for this commit.
This is the bare minimum proposed fix for #45 By using a nested map the way I do in this PR we could also simplify the logic further down where we look for matching direction.Up or direction.Down migrations.
This project depends on github.com/gocql/gocql, which does not support go 1.2. Update the .travis.yml file to match that reality. Add go 1.4 and 1.5 to the test matrix.
Fix travis build file to match reality
Proposed fix for migration file name clashes
Streamline driver code
Fixes migrate --help command
…load-all-drivers-43
[skipci]
We can't test driver.New methods because of circular imports.
That's probably why the initial code had a map[string]interface{} as
registry: it removes a dependency import.
I prefer the remove the registry and have a registry returning a real
Driver. It will ease the development later.
This change insert a timestamped version into schema migration table, instead of incrementing a field. That way, we have a history of passed migrations. Next step: Apply all pending migrations. Pending migrations being the list of all migrations from files, except the ones already applied (d.Versions())
With this patch, folks who were using the mattes/migrate version of this tool can switch to this without having to do extra work. They have 32-bit bit versions in their PostgreSQL and MySQL database that this tool can upgrade to 64-bit on its first check that the migration version table exists. Only those two databases seem to need their schema updated.
use a non-zero exit code when no command is given
correct other import paths in CI and tests
…ards make timestamp versioning backwards compatible
- Added go methods migrator, mongo db template: different from the usual driver model. - Added support for bidirectional files (for go methods), appending _up or _down upon context - Added DriverWithFilnameParser for providing custom filename parser functionality that knows to parse bi-directional file names.
- Changed logic not to use custom filename parser: -Supporting up and down files only, no both direction files -Using method names as is - Added complete test to the mongo db migration scenarios
…cific methods - defined methods receivers registration by name and change the migration files format to include them - added extensive testing
- currently each driver contains only a single method receiver: - enforcing method receiver pre-registration on go methods driver initialization - Method receiver name can be removed from files format - passing the DbName parameter inside the method receiver for the go methods driver
- Added docker support
…skeswa/migrate into feature/consistency-in-conn-str
closes #116
…nto prepare_pr
Author
|
wrong repo, sorry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
taken from mattes#118