-- ============================================
-- Migration: Mutasiku → Sakurupiah Payment Gateway
-- Jalankan query ini di phpMyAdmin atau MySQL CLI
-- ============================================

USE `anzadiyah_store`;

-- Hapus setting Mutasiku
DELETE FROM `settings` WHERE `setting_key` IN ('mutasiku_api_key', 'mutasiku_wallet_id', 'mutasiku_webhook_secret');

-- Tambah setting Sakurupiah
INSERT INTO `settings` (`setting_key`, `setting_value`, `setting_label`, `setting_group`) VALUES
('sakurupiah_api_id', '', 'Sakurupiah API ID', 'payment'),
('sakurupiah_api_key', '', 'Sakurupiah API Key', 'payment')
ON DUPLICATE KEY UPDATE `setting_label` = VALUES(`setting_label`);

-- Update komentar kolom payment_id (opsional, untuk dokumentasi)
ALTER TABLE `orders` MODIFY COLUMN `payment_id` VARCHAR(100) DEFAULT NULL COMMENT 'Sakurupiah trx_id';
