Commit Graph

258 Commits (d10e0e5458351deddeab9dd2bafbbdcf0e6decc9)

Author SHA1 Message Date
Vojtech Vitek d10e0e5458 Fix panic 2017-06-20 15:00:29 -04:00
Vojtech Vitek 28a7ddbabe Create command reads .go files from FS
Fixes #54
2017-06-20 14:55:23 -04:00
Vojtech Vitek 3f83937074 Merge pull request #53 from pressly/rename_examples_dir
Examples structure refactor
2017-06-20 13:04:07 -04:00
Vojtech Vitek 7e6b95b4d0 Examples structure refactor 2017-06-20 12:53:59 -04:00
Vojtech Vitek ca9152bc76 Update README 2017-06-20 12:26:48 -04:00
Vojtech Vitek d0b5acabe5 minor README fix 2017-06-20 12:20:05 -04:00
Vojtech Vitek b9b5cddc80 Merge pull request #52 from pressly/examples
Improve examples
2017-06-20 12:19:03 -04:00
Vojtech Vitek e66261f33e Remove tip from Travis 2017-06-20 12:17:28 -04:00
Vojtech Vitek 8daf954f3a Improve .travis tests 2017-06-20 12:12:51 -04:00
Vojtech Vitek 4df66b56ef Add example READMEs 2017-06-20 12:11:08 -04:00
Vojtech Vitek 3690b1fefd Refactor/simplify custom goose example with Go migrations 2017-06-20 12:11:08 -04:00
Vojtech Vitek 12dd99aa2c Travis: Bump to go1.8 2017-06-20 12:11:08 -04:00
Vojtech Vitek 4754ec24d0 Merge pull request #51 from mkozjak/vendoring
Add vendoring support using dep vendor package manager.
2017-06-20 11:57:01 -04:00
Mario Kozjak ebf4c10880 travis: bump golang version to 1.7
Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>
2017-06-20 17:43:16 +02:00
Mario Kozjak 33c4e7f6a3 Add vendoring.
- Add vendor dependencies for better macos homebrew support
- Referencing #42
- Referencing Homebrew/homebrew-core#14724"

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>

Add vendoring.

- Add vendor dependencies for better macos homebrew support
- Referencing #42
- Referencing Homebrew/homebrew-core#14724

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>

Revert "Add vendoring. (glide)"

This reverts commit 8e3eb6282c955f14d493d6f084b3cf4fb4ad7b2b.

vendoring: removed vendor/; moved Gopkg.toml to topdir; removed Gopkg.lock

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>

travis: use golang/dep for dependency resolving; referencing #51

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>

Gopkg.toml: remove examples

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>

Gopkg.toml: goose doesn't need to pull itself :)

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>

Gopkg.toml: should be able to upgrade minor versions

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>
2017-06-20 17:35:18 +02:00
Vojtech Vitek d9477382e1 Merge pull request #50 from pressly/create_sequential
Create migration file with next version number
2017-06-19 17:30:02 -04:00
Vojtech Vitek 11a1b26516 Create migration file with next version number
Fixes #25
2017-06-19 17:23:29 -04:00
Vojtech Vitek 43bbf73c63 Merge pull request #48 from nkovacs/47-migrate-to-0
Allow down-to to roll back first version
2017-06-19 16:14:23 -04:00
Nikola Kovacs 65a517e879 Allow down-to to roll back first version
Fixes #47
2017-06-09 11:31:42 +02:00
Vojtech Vitek d24a46b61b Merge pull request #46 from duffn/readme-version
Fix dbversion to version
2017-05-08 15:20:41 -04:00
Vojtech Vitek ba3b7a9fde Merge pull request #44 from duffn/gofmt
Reformat code to adhere to golint and gofmt standards
2017-05-08 14:39:07 -04:00
Nicholas Duffy 20b92fa74d Fix comments in final 3 files 2017-05-08 12:10:25 -06:00
Nicholas Duffy abb2957c5d Update formatting per PR comments
Also rename `VersionId` to `VersionID`
2017-05-08 11:01:48 -06:00
Nicholas Duffy 5ee045e0f9 Merge branch 'master' into gofmt 2017-05-08 10:58:07 -06:00
Vojtech Vitek 67771ece62 Merge pull request #43 from duffn/subdirectories-fix
Fix globbing for files in subdirectories
2017-05-08 11:48:05 -04:00
Nicholas Duffy 22099ce50b Fix dbversion to version
The docs and usage state the command for checking the
version of the database is `dbversion` but it is just `version`.
2017-05-07 15:38:23 -06:00
Nicholas Duffy 2a9c8a91b9 Fix globbing for files in subdirectories
The glob `/**/*.sql` was looking for files in subdirectories
only and not finding SQL files in the root directory.

Now making two globs and combining the slices.
2017-05-07 07:17:09 -06:00
Nicholas Duffy fc368fe618 Reformat code to adhere to gofmt standards 2017-05-07 07:02:54 -06:00
Vojtech Vitek fbcec9931f Merge pull request #39 from duffn/sql-subdirectories
Update CollectMigrations for subdirectories
2017-05-06 13:26:03 -04:00
Vojtech Vitek 6b394259db Merge pull request #40 from duffn/readme
Update README
2017-05-06 13:24:48 -04:00
Nicholas Duffy 3c5ec4e555 Update README
- Add list of drivers
- Update command list to reference `up-to` and `down-to`
- Add `up-to` and `down-to` examples
- Update usage output

Closes #37.
2017-05-06 08:43:15 -06:00
Nicholas Duffy 0d5a6db9db Update CollectMigrations for subdirectories
I like to group my migrations by logical subdirectories.

```
[nicholasduffy@duffn:~/go/src/github.com/pressly/goose/migrations on sql-subdirectories]
% tree                                                                                                                                              ✭
.
├── group1
│   └── 20170506073854_table1_create_table.sql
└── group2
    └── 20170506073920_table2_create_table.sql

2 directories, 2 files
```

It's easy to run migrations by groups if necessary. However, I'd like the
ability to run all migrations in all subdirectories at the same time. This
PR adds discovery of all SQL files in subdirectories within the `-dir`
directory.
2017-05-06 08:04:19 -06:00
Vojtech Vitek cdb30a7da1 Merge pull request #36 from bharani91/master
Redo migration bugfix
2017-05-04 11:45:38 -04:00
Bharani eea165e5d3 Redo migration bugfix 2017-05-04 20:36:11 +05:30
Vojtech Vitek d5d23928d9 Merge pull request #33 from duffn/redshift-driver
Add Redshift driver support
2017-05-03 20:59:12 -04:00
Nicholas Duffy 1d402b32ff Add Redshift driver support
Redshift can be accessed and `up`/`down` SQL executed with the `pq`
library by default, however, the `createVersionTableSql` of the `PostgresDialect`
is not compatible with Redshift due to the `serial` datatype and `now()` default on.

This PR creates a new Redshift dialect. The dialect still uses the `pq` library and
only updates the SQL in `createVersionTableSql` to be compatible with Redshift.

Closes #32.
2017-05-03 17:41:20 -06:00
Vojtech Vitek 1da0b166cb Merge pull request #30 from itsjamie/go-template-lint-errs
Golint fixes
2017-04-13 10:23:49 -04:00
Jamie Stackhouse 261b46c60f Update migration.go
golint pass on go migrations
2017-04-12 11:58:26 -03:00
Vojtech Vitek 2784f38ca2 Merge pull request #29 from mmatczuk/mmt/ensure_db_version_panic
Avoid panic in EnsureDBVersion
2017-04-10 14:43:13 -04:00
mmatczuk a66174eb9e Avoid panic in EnsureDBVersion 2017-04-05 12:32:40 +02:00
Vojtech Vitek 99e29546ba Merge pull request #22 from mmatczuk/mmt/export_collect_migrations
Rename collectMigrations to CollectMigrations
2017-03-27 11:21:09 -04:00
Vojtech Vitek 729045fdd1 Merge pull request #23 from przemyslaw-dobrowolski-cl/add_custom_filenames
Add support for adding migrations with custom filenames
2017-03-27 11:19:56 -04:00
Przemyslaw Dobrowolski 9fc6f5207a Add support for adding migrations with custom filenames 2017-03-27 16:12:33 +02:00
mmatczuk 1e8921d41c rename collectMigrations to CollectMigrations 2017-03-27 10:19:04 +02:00
Vojtech Vitek 221ff41793 Merge pull request #21 from mmatczuk/mmt/readme_mysql
MySQL status note
2017-03-24 10:23:49 -04:00
mmatczuk 1d358f1467 MySQL status note 2017-03-24 13:11:15 +01:00
Vojtech Vitek 90a6d29bb6 Merge pull request #20 from p-kozlowski/migrate-to-version
Support for migrating up/down to a specific version
2017-03-21 12:17:36 -04:00
Piotr Kozłowski da36030846 Support for migrating up/down to a specific version 2017-03-17 14:44:22 +01:00
Vojtech Vitek e591daea14 Fix example 2017-03-13 12:08:01 -04:00
Vojtech Vitek 1a4b9210ea Update Goals of this fork 2017-03-13 12:04:18 -04:00