fix: PHP versions fallback and auto-migrate on panel start

This commit is contained in:
orohi
2026-06-17 05:45:22 +03:00
parent f94143acf0
commit 52c4c785df
7 changed files with 54 additions and 32 deletions
+17
View File
@@ -0,0 +1,17 @@
package database
import (
"os"
"path/filepath"
)
func MigrationsPath() (string, error) {
if p := os.Getenv("MIGRATIONS_PATH"); p != "" {
return p, nil
}
wd, err := os.Getwd()
if err != nil {
return "", err
}
return filepath.Join(wd, "migrations"), nil
}