DELETE FROM translations 
WHERE lang_key REGEXP '[[:space:]]';

INSERT INTO `translations` (`lang`, `lang_key`, `lang_value`, `created_at`) VALUES
('en','sitemap_url','Sitemap URL',now()),
('bd','sitemap_url','Sitemap URL',now()),
('sa','sitemap_url','عنوان URL لخريطة الموقع',now()),
('es','sitemap_url','URL del mapa del sitio',now()),
('jp','sitemap_url','サイトマップURL',now()),
('fr','sitemap_url','URL du plan du site',now()),
('in','sitemap_url','साइटमैप यूआरएल',now()),
('nl','sitemap_url','Sitemap-URL',now()),
('af','sitemap_url','Werfkaart-URL',now()),
('eg','sitemap_url','عنوان URL لخريطة الموقع',now()),
('za','sitemap_url','Khariidadda goobta URL',now()),
('ie','sitemap_url','URL léarscáil an tSuímh',now()),
('sg','sitemap_url','URL peta tapak',now()),
('vn','sitemap_url','URL sơ đồ trang web',now()),
('my','sitemap_url','URL peta tapak',now()),
('lk','sitemap_url','தளவரைபட URL',now()),
('ke','sitemap_url','Uuzaji wa Flash',now()),
('th','sitemap_url','แผนผังเว็บไซต์ URL',now()),
('cn','sitemap_url','網站地圖網址',now()),
('zw','sitemap_url','Sitemap URL',now()),
('pk','sitemap_url','سائٹ کا نقشہ URL',now()),
('tr','sitemap_url','Site Haritası URL',now()),
('en','please_select_seller_first','Please Select Seller first.',now()),
('en','commission_percentage','Commission Percentage',now()),
('en','filter_by_verification_status','Filter by Verification Status',now()),
('tr','download_file','Dosyayı İndir',now()),
('tr','delete_file','Dosyayı Sil',now()),
('tr','mime_type','Mim Türü',now()),
('tr','last_modified','Son Değiştirilme Tarihi',now()),
('tr','file_size','Dosya Boyutu',now()),
('tr','file_name','Dosya adı',now()),
('tr','sitemap_generation_history','Site Haritası Oluşturma Geçmişi',now()),
('tr','generate_and_download','Oluştur ve İndir',now()),
('pk','download_file','فائل ڈاؤن لوڈ کریں۔',now()),
('pk','delete_file','فائل کو حذف کریں۔',now()),
('pk','mime_type','مائم کی قسم',now()),
('pk','last_modified','آخری بار ترمیم کی گئی۔',now()),
('pk','file_size','فائل کا سائز',now()),
('pk','file_name','فائل کا نام',now()),
('pk','sitemap_generation_history','سائٹ میپ جنریشن ہسٹری',now()),
('pk','generate_and_download','بنائیں اور ڈاؤن لوڈ کریں۔',now()),
('zw','download_file','Dhaunirodha File',now()),
('zw','delete_file','Delete File',now()),
('zw','mime_type','Mime Type',now()),
('zw','last_modified','Last Modified',now()),
('zw','file_size','Saizi Yefaira',now()),
('zw','file_name','File Name',now()),
('zw','sitemap_generation_history','Sitemap Generation History',now()),
('zw','generate_and_download','Gadzira uye Dhawunirodha',now()),
('cn','download_file','下载文件',now()),
('cn','delete_file','删除文件',now()),
('cn','mime_type','Mime 类型',now()),
('cn','last_modified','上次修改',now()),
('cn','file_size','文件大小',now()),
('cn','file_name','文件名',now()),
('cn','sitemap_generation_history','网站地图生成历史',now()),
('cn','generate_and_download','生成并下载',now()),
('th','download_file','ดาวน์โหลดไฟล์',now()),
('th','delete_file','ลบไฟล์',now()),
('th','mime_type','ประเภท MIME',now()),
('th','last_modified','ปรับปรุงล่าสุด',now()),
('th','file_size','ขนาดไฟล์',now()),
('th','file_name','ชื่อไฟล์',now()),
('th','sitemap_generation_history','ประวัติการสร้างแผนผังเว็บไซต์',now()),
('th','generate_and_download','สร้างและดาวน์โหลด',now()),
('ke','download_file','Pakua Faili',now()),
('ke','delete_file','Futa Faili',now()),
('ke','mime_type','Aina ya Mime',now()),
('ke','last_modified','Iliyorekebishwa Mwisho',now()),
('ke','file_size','Ukubwa wa Faili',now()),
('ke','file_name','Jina la Faili',now()),
('ke','sitemap_generation_history','Historia ya Kizazi cha ramani ya tovuti',now()),
('ke','generate_and_download','Tengeneza na Upakue',now()),
('lk','download_file','கோப்பைப் பதிவிறக்கு',now()),
('lk','delete_file','கோப்பை நீக்கு',now()),
('lk','mime_type','மைம் வகை',now()),
('lk','last_modified','கடைசியாக மாற்றப்பட்டது',now()),
('lk','file_size','கோப்பு அளவு',now()),
('lk','file_name','கோப்பு பெயர்',now()),
('lk','sitemap_generation_history','தளவரைபட தலைமுறை வரலாறு',now()),
('lk','generate_and_download','உருவாக்கி பதிவிறக்கு',now()),
('my','download_file','Muat turun Fail',now()),
('my','delete_file','Padam Fail',now()),
('my','mime_type','Jenis Mime',now()),
('my','last_modified','Terakhir Diubah Suai',now()),
('my','file_size','Saiz Fail',now()),
('my','file_name','Nama Fail',now()),
('my','sitemap_generation_history','Sejarah Penjanaan Peta Laman',now()),
('my','generate_and_download','Hasilkan dan Muat turun',now()),
('vn','download_file','Tải xuống tập tin',now()),
('vn','delete_file','Xóa tập tin',now()),
('vn','mime_type','Kiểu kịch câm',now()),
('vn','last_modified','Lần sửa đổi cuối cùng',now()),
('vn','file_size','Kích thước tập tin',now()),
('vn','file_name','Tên tập tin',now()),
('vn','sitemap_generation_history','Lịch sử thế hệ sơ đồ trang web',now()),
('vn','generate_and_download','Tạo và Tải xuống',now()),
('ie','download_file','Íoslódáil Comhad',now()),
('ie','delete_file','Scrios Comhad',now()),
('ie','mime_type','Cineál Míme',now()),
('ie','last_modified','Athraithe Deiridh',now()),
('ie','file_size','Méid an Chomhaid',now()),
('ie','file_name','Ainm an Chomhaid',now()),
('ie','sitemap_generation_history','Stair Ghiniúint Léarscáil an tSuímh',now()),
('ie','generate_and_download','A chruthú agus a íoslódáil',now()),
('za','download_file','Soo deji faylka',now()),
('za','delete_file','Tirtir Faylka',now()),
('za','mime_type','Nooca Mime',now()),
('za','last_modified','Waxka bedelka u dambeeyay',now()),
('za','file_size','Cabbirka faylka',now()),
('za','file_name','Magaca faylka',now()),
('za','sitemap_generation_history','Taariikhda Jiilka Maabka',now()),
('za','generate_and_download','Abuur oo soo deji',now()),
('eg','download_file','تنزيل الملف',now()),
('eg','delete_file','حذف الملف',now()),
('eg','mime_type','نوع المايم',now()),
('eg','last_modified','آخر تعديل',now()),
('eg','file_size','حجم الملف',now()),
('eg','file_name','اسم الملف',now()),
('eg','sitemap_generation_history','خريطة الموقع تاريخ الإنشاء',now()),
('eg','generate_and_download','إنشاء وتنزيل',now()),
('af','download_file','Laai lêer af',now()),
('af','delete_file','Vee lêer uit',now()),
('af','mime_type','Mime tipe',now()),
('af','last_modified','Laas gewysig',now()),
('af','file_size','Lêergrootte',now()),
('af','file_name','Lêernaam',now()),
('af','sitemap_generation_history','Sitemap Generasie Geskiedenis',now()),
('af','generate_and_download','Genereer en laai af',now()),
('nl','download_file','Bestand downloaden',now()),
('nl','delete_file','Bestand verwijderen',now()),
('nl','mime_type','Mime-type',now()),
('nl','last_modified','Laatst gewijzigd',now()),
('nl','file_size','Bestandsgrootte',now()),
('nl','file_name','Bestandsnaam',now()),
('nl','sitemap_generation_history','Sitemap Generatiegeschiedenis',now()),
('nl','generate_and_download','Genereren en downloaden',now()),
('in','download_file','डाउनलोड फ़ाइल',now()),
('in','delete_file','फ़ाइल नष्ट करें',now()),
('in','mime_type','माइम प्रकार',now()),
('in','last_modified','अंतिम संशोधित',now()),
('in','file_size','फ़ाइल का साइज़',now()),
('in','file_name','फ़ाइल का नाम',now()),
('in','sitemap_generation_history','साइटमैप निर्माण इतिहास',now()),
('in','generate_and_download','उत्पन्न करें और डाउनलोड करें',now()),
('fr','download_file','Télécharger le fichier',now()),
('fr','delete_file','Supprimer le fichier',now()),
('fr','mime_type','Type MIME',now()),
('fr','last_modified','Dernière modification',now()),
('fr','file_size','Taille du fichier',now()),
('fr','file_name','Nom de fichier',now()),
('fr','sitemap_generation_history','Historique de génération du plan du site',now()),
('fr','generate_and_download','Générer et télécharger',now()),
('jp','download_file','ファイルをダウンロード',now()),
('jp','delete_file','ファイルを削除',now()),
('jp','mime_type','MIMEタイプ',now()),
('jp','last_modified','最終更新日',now()),
('jp','file_size','ファイルサイズ',now()),
('jp','file_name','ファイル名',now()),
('jp','sitemap_generation_history','サイトマップ生成履歴',now()),
('jp','generate_and_download','生成してダウンロード',now()),
('es','generate_and_download','Generar y descargar',now()),
('es','sitemap_generation_history','Historial de generación de mapas del sitio',now()),
('es','file_name','Nombre del archivo',now()),
('es','file_size','Tamaño del archivo',now()),
('es','last_modified','Última modificación',now()),
('es','mime_type','Tipo MIME',now()),
('es','delete_file','Eliminar archivo',now()),
('es','download_file','Descargar archivo',now()),
('bd','generate_and_download','Generate and Download',now()),
('bd','sitemap_generation_history','Sitemap Generation History',now()),
('bd','file_name','File Name',now()),
('bd','file_size','File Size',now()),
('bd','last_modified','Last Modified',now()),
('bd','mime_type','Mime Type',now()),
('bd','delete_file','Delete File',now()),
('bd','download_file','Download File',now()),
('sa','download_file','تنزيل الملف',now()),
('sa','delete_file','حذف الملف',now()),
('sa','mime_type','نوع المايم',now()),
('sa','last_modified','آخر تعديل',now()),
('sa','file_size','حجم الملف',now()),
('sa','file_name','اسم الملف',now()),
('sa','sitemap_generation_history','خريطة الموقع تاريخ الإنشاء',now()),
('sa','generate_and_download','إنشاء وتنزيل',now());

INSERT INTO `app_translations` (`lang`, `lang_key`, `lang_value`, `created_at`, `updated_at`)
SELECT `lang`, CONCAT(`lang_key`, '_ucf') AS `lang_key`, `lang_value`, `created_at`, `updated_at`
FROM `translations`
WHERE `lang` = 'en';

ALTER TABLE `order_details` ADD COLUMN `reviewed` TINYINT(1) NOT NULL DEFAULT 0 AFTER `delivery_status`;

UPDATE `order_details` AS `od`
JOIN `orders` AS `o` ON `od`.`order_id` = `o`.`id`
JOIN `reviews` AS `r` ON `r`.`user_id` = `o`.`user_id` AND `r`.`product_id` = `od`.`product_id`
SET `od`.`reviewed` = 1;

INSERT INTO `dynamic_popups` (`id`, `status`, `title`, `summary`, `banner`, `btn_link`, `btn_text`, `btn_text_color`, `btn_background_color`, `created_at`, `updated_at`) VALUES
( 100,0, 'Product review', 'We’d Love to Hear from You!
Your feedback helps us grow and serve you better. If you’ve enjoyed your experience, please take a moment to leave us a quick review. It means the world to us!', null, 'https://demo.activeitzone.com/purchase_history?to_review=1', 'Review Your Products', 'white', '#baa185', '2025-03-27 22:32:51', '2025-03-28 04:33:24');

UPDATE `business_settings` SET `value` = '9.9.4' WHERE `business_settings`.`type` = 'current_version';

COMMIT;