fix: moved embed.FS to own package, so the api binary has no sql files embedded

This commit is contained in:
2026-08-25 11:05:23 +02:00
parent f031f7c15a
commit 2732038a1f
3 changed files with 10 additions and 6 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ import (
"github.com/joho/godotenv"
"github.com/robindittmar/dttmr-api/internal/config"
"github.com/robindittmar/dttmr-api/internal/database"
"github.com/robindittmar/dttmr-api/internal/database/migrations"
"github.com/robindittmar/dttmr-api/internal/domain"
"github.com/robindittmar/dttmr-api/internal/repository"
)
@@ -51,7 +52,7 @@ func main() {
}
}()
if err := database.RunMigrations(db); err != nil {
if err := database.RunMigrations(db, migrations.MigrationFS); err != nil {
slog.Error("failed to run migrations", slog.Any("error", err))
os.Exit(1)
}