v554.sql 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. DROP TABLE `oauth_access_tokens`, `oauth_auth_codes`, `oauth_clients`, `oauth_personal_access_clients`, `oauth_refresh_tokens`;
  2. DROP TABLE `app_settings`, `banners`, `general_settings`, `links`, `policies`, `seo_settings`, `sliders`;
  3. CREATE TABLE `personal_access_tokens` (
  4. `id` bigint(20) UNSIGNED NOT NULL,
  5. `tokenable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  6. `tokenable_id` bigint(20) UNSIGNED NOT NULL,
  7. `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  8. `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  9. `abilities` text COLLATE utf8mb4_unicode_ci,
  10. `last_used_at` timestamp NULL DEFAULT NULL,
  11. `created_at` timestamp NULL DEFAULT NULL,
  12. `updated_at` timestamp NULL DEFAULT NULL
  13. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  14. ALTER TABLE `personal_access_tokens`
  15. ADD PRIMARY KEY (`id`),
  16. ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  17. ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);
  18. ALTER TABLE `personal_access_tokens`
  19. MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  20. CREATE TABLE `transactions` (
  21. `id` int(11) NOT NULL,
  22. `user_id` int(11) NOT NULL,
  23. `gateway` varchar(255) DEFAULT NULL,
  24. `payment_type` varchar(255) DEFAULT NULL,
  25. `additional_content` text,
  26. `mpesa_request` varchar(255) DEFAULT NULL,
  27. `mpesa_receipt` varchar(255) DEFAULT NULL,
  28. `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  29. `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
  30. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  31. ALTER TABLE `transactions`
  32. ADD PRIMARY KEY (`id`);
  33. ALTER TABLE `transactions`
  34. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  35. UPDATE `business_settings` SET `value` = '5.5.4' WHERE `business_settings`.`type` = 'current_version';
  36. COMMIT;