-- Pixmenia v23 preserve admin settings
CREATE TABLE IF NOT EXISTS `settings_backups` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `source_table` VARCHAR(80) NOT NULL,
  `backup_json` LONGTEXT NOT NULL,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `system_update_warnings` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `warning_key` VARCHAR(120) NOT NULL UNIQUE,
  `warning_text` TEXT NOT NULL,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `system_update_warnings` (`warning_key`, `warning_text`) VALUES
('preserve_admin_settings','Admin settings, logo, favicon, Stripe, PayPal, Resend, SEO and packages are protected during additive phpMyAdmin updates.')
ON DUPLICATE KEY UPDATE `warning_text`=VALUES(`warning_text`);
