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:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user