forked from pressly/goose
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.go
More file actions
41 lines (33 loc) · 747 Bytes
/
version.go
File metadata and controls
41 lines (33 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package goose
import (
"database/sql"
)
// Version prints the current version of the database.
func Version(db *sql.DB, dir string) error {
current, err := GetDBVersion(db)
if err != nil {
return err
}
log.Printf("goose: version %v\n", current)
return nil
}
var (
tableName = "goose_db_version_v2"
tableOldName = "goose_db_version"
)
// TableName returns goose db version table name
func TableName() string {
return tableName
}
// SetTableName set goose db version table name
func SetTableName(n string) {
tableName = n
}
// TableName returns goose db version table name
func TableOldName() string {
return tableOldName
}
// SetTableName set goose db version table name
func SetTableOldName(n string) {
tableOldName = n
}