modified: serv_nginx/api_bb/Makefile

modified:   serv_nginx/api_bb/internal/database/migrate.go
set auto migrate for api_bb reviews table
This commit is contained in:
2025-10-15 03:13:40 +05:00
parent c0c8c3392a
commit 8f02ad8a83
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ stop_bb:
docker compose down api_bb
build_bb:
docker compose build ${BB} --no-cache
docker compose build api_bb --no-cache
run_bb: build
docker compose up api_bb -d
@@ -18,6 +18,7 @@ func (d *Database) Migrate() error {
&models.User{},
&models.News{},
&models.Comment{},
&models.Review{},
// Добавьте другие модели здесь
}
@@ -72,6 +73,8 @@ func getModelName(model interface{}) string {
return "News"
case *models.Comment:
return "Comment"
case *models.Review:
return "Reviews"
default:
return "Unknown"
}