This repository was archived by the owner on Jun 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 321
Conversation
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
Using epoch prefixed filenames, multiple developers can commit migrations while minimizing versioning conflicts. This commit remains backwards compatible with all previous migrations and requires no changes to the `schema_migrations` table. This commit also cleans up migrate-test temp directories
…chance to select the correct driver
- 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
typo fixed
Release OS signals when you're finished with them.
Bump travis versions to use Go 1.6 and 1.7
Skip tests requiring a DB connection with the '-short' flag
Fixes typos.
use a non-zero exit code when no command is given
prefix migration files with epoch
Driver for the Crate.io database
Owner
|
I rebased with master. Tests fail at: |
Update README to reflect epoch filenames
Contributor
Author
|
OK, I will check/fix it in a few days. |
Adds a driver for the embedded Ql database (https://github.com/cznic/ql)
Add Ql driver
- Fixed test with not-exported method identified as missing: unified the 2 errors into one - Fixed error message formatting # Conflicts: # docker-compose.yml
- Fixed test with not-exported method identified as missing: unified the 2 errors into one - Fixed error message formatting # Conflicts: # docker-compose.yml
Contributor
Author
|
Merged master and fixed the errors. |
Owner
|
Rebasing would be much appreciated. With 1,884 additions it's really hard for me to understand what changed and what not :-) |
Contributor
Author
|
No problem :-) |
Using epoch prefixed filenames, multiple developers can commit migrations while minimizing versioning conflicts. This commit remains backwards compatible with all previous migrations and requires no changes to the `schema_migrations` table. This commit also cleans up migrate-test temp directories
Adds a driver for the embedded Ql database (https://github.com/cznic/ql)
Contributor
Author
|
This branch is a mess after the merge, I'll make a new pull request from a clean branch. |
Contributor
Author
|
Created a new branch with rebase (prepare_pr_2_rebase) and a new pull request - Driver for Mongo DB (New). |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Support for MongoDB driver by custom app-logic golang methods.
Users of the driver should pre-register their golang method receiver (struct) with methods in a fixed format - in a similiar fashion to how drivers are pre-registered before running Migrate().
MongoDB eval() operation is deprecated starting from MongoDB 3, so I couldn't use .json files and pass them to eval like .sql files are used for relational databases (as in Mongeez project), and using an embedded javascript interpreter sounds like an overkill, so golang methods were my preferred approach.
Gomethods migration files execution mechanism was added in a mongodb-agnostic manner - so that in future it could be extended for other purposes if needed.