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>
26 lines
694 B
Bash
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[@]}" "$@"
|