# iKhokha Migration SQL This folder contains SQL migration files to add iKhokha/provider metadata to the `payments` table and to migrate legacy `efts` records. Order to run: 1. Backup your database (mysqldump or preferred tool). 2. Apply `001_add_payment_columns.sql` on staging and verify schema changes. 3. (Optional) Apply `002_migrate_efts_to_payments.sql` to copy legacy `efts` into `payments`. Commands (example using MySQL client): ```bash mysql -u dbuser -p databasename < scripts/ikhokha_migrations/001_add_payment_columns.sql mysql -u dbuser -p databasename < scripts/ikhokha_migrations/002_migrate_efts_to_payments.sql ``` Notes: - Always test on staging before running in production. - `provider_response` is a JSON column used to store raw provider responses for audit. - If you prefer not to migrate `efts`, skip step 3 and keep legacy POP handling.