mirror of
https://github.com/pressly/goose.git
synced 2025-07-15 00:28:10 +00:00
Fix comments in final 3 files
This commit is contained in:
parent
abb2957c5d
commit
20b92fa74d
2
redo.go
2
redo.go
@ -4,7 +4,7 @@ import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
// Redo : Roll back the most recently applied migration, then run it again.
|
||||
// Redo rolls back the most recently applied migration, then runs it again.
|
||||
func Redo(db *sql.DB, dir string) error {
|
||||
currentVersion, err := GetDBVersion(db)
|
||||
if err != nil {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Status : Print the status of all migrations.
|
||||
// Status prints the status of all migrations.
|
||||
func Status(db *sql.DB, dir string) error {
|
||||
// collect all migrations
|
||||
migrations, err := CollectMigrations(dir, minVersion, maxVersion)
|
||||
|
6
up.go
6
up.go
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// UpTo : Migrate up to a specific version.
|
||||
// UpTo migrates up to a specific version.
|
||||
func UpTo(db *sql.DB, dir string, version int64) error {
|
||||
migrations, err := CollectMigrations(dir, minVersion, version)
|
||||
if err != nil {
|
||||
@ -33,12 +33,12 @@ func UpTo(db *sql.DB, dir string, version int64) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Up : Apply all available migrations.
|
||||
// Up applies all available migrations.
|
||||
func Up(db *sql.DB, dir string) error {
|
||||
return UpTo(db, dir, maxVersion)
|
||||
}
|
||||
|
||||
// UpByOne : Migrate up by a single version.
|
||||
// UpByOne migrates up by a single version.
|
||||
func UpByOne(db *sql.DB, dir string) error {
|
||||
migrations, err := CollectMigrations(dir, minVersion, maxVersion)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user