Files
boursecu_server/database/sql/run_deploy_settings.sh
T
mohmdsdgandCursor 027170a33f fix(settings): fee only from fee_service_charge_percentage; deploy:tenant
Remove service_charge_percentage alias and config/fee.php fallback (empty → 0).
Move code-managed Montzar/price runtime keys to can_edit=1 in deploy SQL.
Add settings:deploy and deploy:tenant artisan commands for server deploy.
Advanced admin settings merge runtime keys from local DB; block manual edits.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 19:55:29 +03:30

26 lines
694 B
Bash

#!/usr/bin/env bash
# اجرای deploy_settings_const.sql — ترجیحاً از artisan (اتصال .env):
#
# php artisan settings:deploy
# php artisan settings:deploy tenant_db_name
# php artisan settings:deploy --preserve
# php artisan settings:deploy db1 db2
#
# این اسکریپت همان artisan را صدا می‌زند.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$ROOT"
if [[ ! -f artisan ]]; then
echo "ERROR: artisan not found in $ROOT" >&2
exit 1
fi
ARGS=()
if [[ -n "${SQL_FILE:-}" && "${SQL_FILE}" != "database/sql/deploy_settings_const.sql" ]]; then
ARGS+=(--file="$SQL_FILE")
fi
exec php artisan settings:deploy "${ARGS[@]}" "$@"