Skip to content

Commit

Permalink
Another migrate pkg (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
chapsuk authored May 23, 2018
1 parent b49b98d commit 80ffe32
Show file tree
Hide file tree
Showing 53 changed files with 778 additions and 387 deletions.
18 changes: 9 additions & 9 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ Aimed to add extra features and hide some limitations of existing golang migrati

PackageName | Version | Postgres | MySQL
----------- | ------- | ------------------- | --------
goose | 2.3.0 | :heavy_check_mark: | :heavy_check_mark:
migrate | 3.2.0 | :heavy_check_mark: | :heavy_check_mark:
[goose](https://github.com/pressly/goose) | 2.3.0 | :heavy_check_mark: | :heavy_check_mark:
[migrate](https://github.com/golang-migrate/migrate) | 3.2.0 | :heavy_check_mark: | :heavy_check_mark:
[impg](https://github.com/im-kulikov/migrate) | 0.1 | :heavy_check_mark:


## Features

Expand Down
2 changes: 1 addition & 1 deletion converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func createFormatter(name string) (Formatter, error) {
return &GooseFormatter{}, nil
case driver.Migrate:
return &MigrateFormatter{}, nil
case driver.Stump:
case driver.Impg:
return &MigrateFormatter{}, nil
default:
return nil, fmt.Errorf("unsupported driver name %s", name)
Expand Down
4 changes: 2 additions & 2 deletions driver/stump/migrator.go → driver/impg/migrator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package stump
package impg

import (
"fmt"
Expand All @@ -9,7 +9,7 @@ import (
"github.com/chapsuk/miga/logger"
"github.com/chapsuk/miga/utils"
"github.com/go-pg/pg"
orig "github.com/m1ome/stump/package/migrate"
orig "github.com/im-kulikov/migrate"
)

type Migrator struct {
Expand Down
10 changes: 5 additions & 5 deletions driver/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ import (
"errors"

"github.com/chapsuk/miga/driver/goose"
"github.com/chapsuk/miga/driver/impg"
"github.com/chapsuk/miga/driver/migrate"
"github.com/chapsuk/miga/driver/stump"
)

const (
Goose = "goose"
Migrate = "migrate"
Stump = "stump"
Impg = "impg"
)

func Available(name string) bool {
switch name {
case Goose:
case Migrate:
// case Stump:
case Impg:
default:
return false
}
Expand Down Expand Up @@ -63,8 +63,8 @@ func New(cfg *Config) (Interface, error) {
cfg.VersionTableName,
cfg.Dir,
)
case Stump:
return stump.New(
case Impg:
return impg.New(
cfg.Dialect,
cfg.Dsn,
cfg.VersionTableName,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var (
drivers = map[driverName]dialects{
"goose": []string{"mysql", "postgres"},
"migrate": []string{"mysql", "postgres"},
// "stump": []string{"postgres"},
"impg": []string{"postgres"},
}

dsns = map[string]dsn{
Expand Down
8 changes: 8 additions & 0 deletions vendor/github.com/go-pg/pg/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/go-pg/pg/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions vendor/github.com/go-pg/pg/db.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions vendor/github.com/go-pg/pg/error.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/go-pg/pg/options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/go-pg/pg/orm/count_estimate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion vendor/github.com/go-pg/pg/orm/create_table.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion vendor/github.com/go-pg/pg/orm/drop_table.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions vendor/github.com/go-pg/pg/orm/field.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion vendor/github.com/go-pg/pg/orm/format.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions vendor/github.com/go-pg/pg/orm/insert.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vendor/github.com/go-pg/pg/orm/model.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 80ffe32

Please sign in to comment.