HortusFox: start applying db migrations (#16324)

This commit is contained in:
Tom Frenzel
2026-08-07 19:45:32 +02:00
committed by GitHub
parent f0fc577d79
commit a296ccfc7e
2 changed files with 41 additions and 11 deletions
+5 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# Author: MickLesk (CanbiZ) | Co-Author: Tom Frenzel (tomfrenzel)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/danielbrendel/hortusfox-web
@@ -36,12 +36,15 @@ msg_ok "Composer dependencies installed"
msg_info "Running DB migration"
$STD php asatru migrate:fresh
HORTUSFOX_VERSION="$(<~/.hortusfox)"
printf '["%s"]\n' "$HORTUSFOX_VERSION" >/opt/hortusfox/app/migrations/verhist.json
msg_ok "Migration finished"
msg_info "Setting up HortusFox"
$STD mariadb -u root -D $MARIADB_DB_NAME -e "INSERT IGNORE INTO AppModel (workspace, language, created_at) VALUES ('Default Workspace', 'en', NOW());"
$STD php asatru plants:attributes
$STD php asatru calendar:classes
$STD php asatru plants:attributes
$STD php asatru aquashell:config
ADMIN_EMAIL="admin@example.com"
ADMIN_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)"
ADMIN_HASH=$(php -r "echo password_hash('$ADMIN_PASS', PASSWORD_BCRYPT);")