Skip to content

Commit

Permalink
renamed sqlite to sqlite3 for consistency across codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
xtda committed Sep 22, 2019
1 parent a917b4e commit 87578ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion create.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func CreateWithTemplate(db *sql.DB, dir string, tmpl *template.Template, name, m
}

_ = createFile(migrationPath, "postgres.sql", version, tmpl)
_ = createFile(migrationPath, "sqlite.sql", version, tmpl)
_ = createFile(migrationPath, "sqlite3.sql", version, tmpl)

return nil
}
Expand Down
1 change: 1 addition & 0 deletions goose.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func SetVerbose(v bool) {
// Run runs a goose command.
func Run(command string, db *sql.DB, dbType, dir string, args ...string) error {
SetDialect(dbType)

switch command {
case "up":
if err := Up(db, dir, dbType); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion status.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func Status(db *sql.DB, dir, dbType string) error {
if err != nil {
return errors.Wrap(err, "failed to collect migrations")
}

// must ensure that the version table exists if we're running on a pristine DB
SetDialect(dbType)
if _, err := EnsureDBVersion(db); err != nil {
Expand All @@ -29,6 +28,7 @@ func Status(db *sql.DB, dir, dbType string) error {

log.Println(" Applied At Migration")
log.Println(" =======================================")

for _, migration := range migrations {
x := strings.Split(migration.Source, "migrations/")
name := strings.Split(x[1], "/")
Expand Down

0 comments on commit 87578ee

Please sign in to comment.