v552.sql 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. CREATE TABLE `payku_transactions` (
  2. `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  3. `status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  4. `order` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  5. `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  6. `subject` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  7. `url` text COLLATE utf8mb4_unicode_ci,
  8. `amount` int(10) UNSIGNED DEFAULT NULL,
  9. `notified_at` datetime DEFAULT NULL,
  10. `created_at` timestamp NULL DEFAULT NULL,
  11. `updated_at` timestamp NULL DEFAULT NULL
  12. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  13. ALTER TABLE `payku_transactions`
  14. ADD UNIQUE KEY `payku_transactions_id_unique` (`id`),
  15. ADD UNIQUE KEY `payku_transactions_order_unique` (`order`);
  16. COMMIT;
  17. CREATE TABLE `payku_payments` (
  18. `transaction_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  19. `start` date NOT NULL,
  20. `end` date NOT NULL,
  21. `media` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  22. `transaction_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  23. `payment_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  24. `verification_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  25. `authorization_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  26. `last_4_digits` int(10) UNSIGNED DEFAULT NULL,
  27. `installments` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  28. `card_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  29. `additional_parameters` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  30. `currency` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  31. `created_at` timestamp NULL DEFAULT NULL,
  32. `updated_at` timestamp NULL DEFAULT NULL
  33. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  34. ALTER TABLE `payku_payments`
  35. ADD UNIQUE KEY `payku_payments_transaction_id_unique` (`transaction_id`);
  36. ALTER TABLE `payku_payments`
  37. ADD CONSTRAINT `payku_payments_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `payku_transactions` (`id`);
  38. ALTER TABLE `products` ADD `external_link_btn` VARCHAR(255) NULL DEFAULT 'Buy Now' AFTER `external_link`;
  39. UPDATE `business_settings` SET `value` = '5.5.2' WHERE `business_settings`.`type` = 'current_version';
  40. COMMIT;