#!/usr/bin/env bash # Export full database dump (schema + data + triggers) from current dev database # This creates a single file that can be imported directly set -euo pipefail # Add mysql-client to PATH (keg-only on macOS) export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH" DB_HOST="127.0.0.1" DB_PORT="3306" DB_USER="beepzone_user" DB_PASS="BeepZONE77" DB_NAME="beepzone" echo "Exporting full database dump (schema + data + triggers)..." mysqldump \ --host="$DB_HOST" \ --port="$DB_PORT" \ --user="$DB_USER" \ --password="$DB_PASS" \ --single-transaction \ --routines \ --triggers \ --events \ --skip-comments \ --skip-dump-date \ --skip-tz-utc \ "$DB_NAME" > beepzone-full-dump.sql echo "Exported to: beepzone-full-dump.sql" echo "" echo "This file contains:" echo " - Complete schema (CREATE TABLE statements)" echo " - All data (INSERT statements)" echo " - Triggers and routines" echo " - Ready for single-file import"