chore: Remove unused migrationDir function and related imports
Support Migration using sql ( for future use)
This commit is contained in:
parent
f49fc848e4
commit
8198829b73
2 changed files with 2 additions and 10 deletions
|
@ -4,8 +4,6 @@ import (
|
||||||
"embed"
|
"embed"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
|
||||||
"runtime"
|
|
||||||
|
|
||||||
"donetick.com/core/config"
|
"donetick.com/core/config"
|
||||||
chModel "donetick.com/core/internal/chore/model"
|
chModel "donetick.com/core/internal/chore/model"
|
||||||
|
@ -67,11 +65,3 @@ func MigrationScripts(gormDB *gorm.DB, cfg *config.Config) error {
|
||||||
fmt.Printf("Applied %d migrations!\n", n)
|
fmt.Printf("Applied %d migrations!\n", n)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func migrationDir() string {
|
|
||||||
_, filename, _, ok := runtime.Caller(1)
|
|
||||||
if !ok {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return filepath.Join(filepath.Dir(filename), "../../migrations")
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- +migrate Up
|
||||||
|
-- nothing here just to include in he embeded sql :)
|
Loading…
Add table
Reference in a new issue