Migrations
==========
001  schema.sql                       base schema (fresh installs; install.php imports it)
002  002_commerce_upgrade.sql         new tables only (IF NOT EXISTS)
     migrate.php                      guarded column/index additions + backfill (information_schema checks)

Apply:    php database/migrate.php
Preview:  php database/migrate.php --report

Existing installs: take a backup first (cPanel > Backup, or phpMyAdmin Export), then apply.
Every statement is idempotent. Nothing is dropped, truncated or rewritten.

Rollback guidance
-----------------
New tables (drop to roll back; they hold no data the base app needs):
 conversation_state message_payloads product_events checkout_sessions order_events
 workspace_settings plans subscriptions credit_wallets credit_ledger invoices ai_corrections
 agent_config_versions lead_signals followup_rules followup_log booking_services bookings
 campaigns campaign_recipients customer_consent
Added columns are nullable or defaulted; leaving them in place is harmless.
