This commit is contained in:
@@ -11,8 +11,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// Tracks whether the DB connector has been initialized
|
||||
is_initialized bool
|
||||
// // Tracks whether the DB connector has been initialized
|
||||
// is_initialized bool
|
||||
|
||||
// The SQL schema of the database under management
|
||||
sql_schema *string
|
||||
@@ -44,7 +44,7 @@ func Init(schema *string, migrationsList *[]string) {
|
||||
sql_schema = schema
|
||||
migrations = migrationsList
|
||||
version_number = uint(len(*migrations))
|
||||
is_initialized = true
|
||||
// is_initialized = true
|
||||
}
|
||||
|
||||
func Create(path string) (*sqlx.DB, error) {
|
||||
@@ -93,7 +93,7 @@ func CheckAndUpdateVersion(db *sqlx.DB) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Run all the migrations from version X to version Y, and update the `database_version` table's `version_number`
|
||||
// UpgradeFromXToY runs all the migrations from version X to version Y, and update the `database_version` table's `version_number`
|
||||
func UpgradeFromXToY(db *sqlx.DB, x uint, y uint) {
|
||||
for i := x; i < y; i++ {
|
||||
fmt.Print(ColorCyan)
|
||||
|
||||
Reference in New Issue
Block a user