Commit Graph

717 Commits

Author SHA1 Message Date
Bence Patyi 144aaaa986 Gitlab source (#184)
* New Gitlab source

* fix: use net package to build url string

* add: gitlab source to Makefile and Dockerfile
2019-03-10 18:38:23 -07:00
Dale Hui 14f26d8818
Update supported Go versions badge
Drop 1.10 and add 1.12
2019-03-07 11:42:22 -08:00
Dale Hui f8f7beea54 Deploy using Go 1.12 2019-03-02 02:04:53 -08:00
Dale Hui c6c22b34c8
Fix broken "versions" table formatting in README 2019-03-01 18:52:20 -08:00
Dale Hui 752cdc3b11 Update "versions" table in the README
- Reflect supported versions
    - With Go 1.12 released, module support is no longer an issue
2019-03-01 18:49:12 -08:00
Dale Hui f5c4ccff1f Update dependencies 2019-03-01 17:45:37 -08:00
Dale Hui 5e004dbef4 Fix issues with new version of MongoDB driver:
- "connect=single" option is no longer supported
        - "connect=direct" is the equivalent
        - https://jira.mongodb.org/browse/GODRIVER-665
    - Count() needs to be passed a non-nil filter/document
        - https://jira.mongodb.org/browse/GODRIVER-572
2019-03-01 17:44:40 -08:00
Dale Hui 4fba554b47 Drop support for go1.10
- Remove dep package pinnings
2019-03-01 14:37:54 -08:00
Dale Hui 6593dc8dbf Support Go 1.12 2019-02-27 23:44:23 -08:00
Lukas Joergensen 480a5a634a postgres: Move lock out of ensureVersionTable, for consistency with other SQL operations (#173)
* Consistently lock in ensureVersionTable and do not call ensureVersionTable from Drop across all database implementations

* Add test for dropping postgres databases

* Fix failing database tests

* Fix CockroachDb test, lock table should be created before versionTable

* Add Initialize() to Driver interface, and add integration tests for Drop() between database implementations and migrate

* Remove Initialize, document breaking behaviour of Drop

* Revert introduction of Initialize method

* Removed Initialize in Stub as well

* Remove call to non-existent Initialize and make sure to close re-initialized database connections

* Revert changes to TestDrop in database/testing

* Split Test and TestMigrate into different test entrypoints

* Remove unused import in migrate_testing

* Remove erroneous code to fix tests

* Add stub source imports to database tests

* Add Stub source to migrate tests

* Use example migrations for tests

* Add file driver to database tests

* Align database directory layout

* Add file source driver to Cassandra

* Review changes

* Minor syntactic change for cleaner diff
2019-02-26 15:56:57 -08:00
Dale Hui f213007d4d Use alpine 3.9 for building Docker images 2019-02-19 03:25:47 -08:00
Dale Hui 0f8263de2e Remove unnecessary panics from core implementation 2019-02-19 02:07:07 -08:00
Dale Hui 9b449be538
Merge pull request #176 from jszwedko/quote-postgres-identifiers
Quote postgres table identifiers when `DROP`ing
2019-02-18 03:14:11 -08:00
Jesse Szwedko 3db0395e0a Replace " quoting with pq.QuoteIdentifier for postgres driver 2019-02-18 11:44:38 +01:00
Jesse Szwedko fe66cd7734 Quote postgres table identifiers when `DROP`ing
Handles table identifiers that are invalid without quotes (such as
uppercase letters).
2019-02-18 11:29:10 +01:00
Dale Hui 4190b85018
Merge pull request #175 from plutov/master
Add mongodb driver to Dockerfile
2019-02-18 02:05:12 -08:00
Alex Pliutau 0a355bbee0 Add mongodb driver to Dockerfile 2019-02-18 10:15:23 +01:00
Dale Hui c0f025d2f6
Merge pull request #167 from arpando/fix/DocumentNilError
Fix document nil error
2019-02-05 03:48:34 -08:00
Arcadio Pando 56620dc3dd Fix document nil error 2019-02-04 17:37:22 +01:00
Dale Hui 598addc6d7
Merge pull request #166 from bcho/fix/sqlite3-migration-table
sqlite3: fix wrong schema table usage
2019-02-02 11:19:58 -08:00
hbc 95e701da6a sqlite3: fix wrong schema table usage
fixes: https://github.com/golang-migrate/migrate/issues/165
2019-02-02 13:22:40 +08:00
Dale Hui f6d624c729
Merge pull request #150 from tsenart/atomic-migrations-table-creation
postgres: Make `ensureVersionTable` atomic
2019-01-15 11:55:50 -08:00
Dale Hui 5ad19c5071 Run `dep ensure`
- Updates Gopkg.lock after github.com/hashicorp/go-multierror package was manually added to Gopkg.toml
2019-01-15 11:33:17 -08:00
Tomás Senart 41a595f62a
fixup! Add github.com/hashicorp/go-multierror@v1.0.0 to Gopkg.yaml 2019-01-15 11:28:49 +01:00
Tomás Senart f58da1d4dc
fixup! More explicit conditionals 2019-01-15 11:28:49 +01:00
Tomás Senart b57dbceec3
postgres: Revert back to use CREATE IF NOT EXISTS 2019-01-15 11:28:49 +01:00
Tomás Senart 06c80ae2da
postgres: Use multierror.Error in ensureVersionTable 2019-01-15 11:28:49 +01:00
Tomás Senart 0beddcd2d0
postgres: Be explicit about max idle and open conns 2019-01-15 11:28:48 +01:00
Tomás Senart 94f5aa00fc
postgres: Query table existance in `ensureVersionTable`
This commit reverts back to querying the existance of the table instead
of using CREATE IF NOT EXISTS because we want to support versions of
Postgres older than 9.1 which is when this feature was introduced.
2019-01-15 11:28:48 +01:00
Tomás Senart 5bf80d7ef2
postgres: Add comment about connection pool in TestWithInstance_Concurrent 2019-01-15 11:28:48 +01:00
Tomás Senart 09a1959309
postgres: Preserve Unlock error when outer err isn't nil 2019-01-15 11:28:48 +01:00
Tomás Senart 15713e64cb
postgres: Use sync.WaitGroup in TestWithInstance_Concurrent 2019-01-15 11:28:48 +01:00
Tomás Senart 519dae2639
postgres: Make `ensureVersionTable` atomic
Fixes https://github.com/golang-migrate/migrate/issues/55
2019-01-15 11:28:48 +01:00
Tomás Senart ce7a2234ee
fixup! Pass config to WithInstance 2019-01-15 11:28:48 +01:00
Tomás Senart a06a92d620
postgres: TestWithInstance_Concurrent 2019-01-15 11:28:47 +01:00
Dale Hui 1ca4da9a33 Run `go mod tidy` 2019-01-14 12:56:51 -08:00
Dale Hui 52fc08fdf5 Update supported DB versions 2019-01-12 16:13:26 -08:00
Dale Hui 2feaaaddda Update dktest from v0.2.0 to v0.3.0
- Update ReadyFuncs accordingly
2019-01-08 22:39:26 -08:00
Dale Hui 9870a84b99 Update Cassandra DB driver (gocql) 2019-01-08 11:25:23 -08:00
Dale Hui bbec63fda7 Use one of the 2 ports exposed by MySQL Docker images
- MySQL driver tests should pass more consistently now
2019-01-08 05:11:07 -08:00
Dale Hui 809c7f0ac8 Use dktest to run docker tests
- Leaving migrate/testing in case there are unknown consumers
    - Add migrate/dktesting package
    - Update tests to use migrate/dktesting instead of migrate/testing
2019-01-08 05:11:07 -08:00
Dale Hui fd47ba9a9a Remove TODO for MongoDB database driver 2019-01-08 05:01:48 -08:00
Dale Hui b1a199a272
Merge pull request #146 from bobrovde/mongodb-driver
added mongodb driver
2019-01-08 02:34:59 -08:00
Dale Hui fc8d57d128
Merge branch 'master' into mongodb-driver 2019-01-07 22:50:51 -08:00
Dale Hui f24ea4d6c9
Update TravisCI badge after migration from .org to .com 2019-01-07 22:45:35 -08:00
DBobrov 12b93a3a07 Change checking of mongo replica set initialization 2019-01-07 15:17:35 +03:00
DBobrov 3fa0df7553 Refactor mongodb transactions test 2019-01-07 11:47:37 +03:00
DBobrov 13978a108a Add test for migrations in transaction mode 2019-01-06 12:45:22 +03:00
Dale Hui d549fd5265 Fix memory leak in tests
- Stop leaking tickers. As the docs state, using time.Tick() will leak tickers,
      so use time.NewTicker() with time.Ticker.Stop().
    - Be more efficient by using time.NewTimer() with time.Timer.Stop() instead of time.After().
2019-01-05 13:52:25 -08:00
DBobrov 30d2d94a22 Fix review comments 2019-01-05 11:10:25 +03:00