feat: 添加数据库迁移工具并创建AI记账服务文件。
This commit is contained in:
@@ -14,12 +14,12 @@ import (
|
||||
func main() {
|
||||
// Load .env file from project root (try multiple locations)
|
||||
envPaths := []string{
|
||||
".env", // Current directory
|
||||
"../.env", // Parent directory (when running from backend/)
|
||||
"../../.env", // Two levels up (when running from backend/cmd/migrate/)
|
||||
".env", // Current directory
|
||||
"../.env", // Parent directory (when running from backend/)
|
||||
"../../.env", // Two levels up (when running from backend/cmd/migrate/)
|
||||
filepath.Join("..", "..", ".env"), // Explicit path
|
||||
}
|
||||
|
||||
|
||||
for _, envPath := range envPaths {
|
||||
if err := godotenv.Load(envPath); err == nil {
|
||||
log.Printf("Loaded environment from: %s", envPath)
|
||||
|
||||
Reference in New Issue
Block a user