-- cloud/migrations/2026-07-20-move-table-prefix.sql -- Rename every P1-B table to the `move_` prefix (shared-hosting DB co-tenancy). -- Run ONCE in phpMyAdmin BEFORE deploying code that reads the prefixed names. -- Fresh installs: skip this, cloud/schema.sql already creates prefixed tables. -- -- RENAME TABLE is atomic across all pairs and preserves indexes, constraints -- and FKs (fk_event_snapshots_event follows its parent automatically). RENAME TABLE users TO move_users, devices TO move_devices, cameras TO move_cameras, zones TO move_zones, events TO move_events, event_snapshots TO move_event_snapshots, thresholds TO move_thresholds, nonces TO move_nonces, rate_limits TO move_rate_limits, audit_log TO move_audit_log;