feat: 添加数据库迁移工具并创建AI记账服务文件。

This commit is contained in:
2026-01-29 22:00:15 +08:00
parent cf34f8b3d0
commit 81f814c928
2 changed files with 384 additions and 13 deletions

View File

@@ -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)