1.2.3.sql 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. CREATE TABLE IF NOT EXISTS `paymeuz_transactions` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `date_create` datetime NOT NULL,
  4. `transact_id` varchar(255) NOT NULL,
  5. `op_transact_id` varchar(255) NOT NULL,
  6. `op_customer_id` varchar(255) NOT NULL,
  7. `amount` double NOT NULL DEFAULT 0,
  8. `state` tinyint(2) NOT NULL DEFAULT 0,
  9. `payme_transact_timestamp` bigint(15) UNSIGNED NOT NULL DEFAULT 0,
  10. `create_timestamp` bigint(15) UNSIGNED NOT NULL DEFAULT 0,
  11. `perform_timestamp` bigint(15) UNSIGNED NOT NULL DEFAULT 0,
  12. `cancel_timestamp` bigint(15) UNSIGNED NOT NULL DEFAULT 0,
  13. `cancel_reason` varchar(255) NOT NULL DEFAULT '',
  14. `receivers` text DEFAULT '',
  15. PRIMARY KEY (`id`),
  16. KEY `date_create` (`date_create`),
  17. KEY `transact_id` (`transact_id`),
  18. KEY `op_transact_id` (`op_transact_id`),
  19. KEY `op_customer_id` (`op_customer_id`),
  20. KEY `payme_transact_timestamp` (`payme_transact_timestamp`),
  21. KEY `create_timestamp` (`create_timestamp`),
  22. KEY `perform_timestamp` (`perform_timestamp`),
  23. KEY `cancel_timestamp` (`cancel_timestamp`)
  24. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  25. ALTER TABLE `buildpassport` ADD `contract` TINYINT NULL , ADD `mediator` TINYINT NULL ;
  26. CREATE TABLE IF NOT EXISTS `ot_users` (
  27. `id` int(11) NOT NULL AUTO_INCREMENT,
  28. `date` datetime NOT NULL,
  29. `remoteid` int(11) NOT NULL,
  30. `login` varchar(64) NOT NULL,
  31. `email` varchar(64) DEFAULT NULL,
  32. `phone` varchar(32) DEFAULT NULL,
  33. `code` varchar(64) DEFAULT NULL,
  34. `tariffid` int(11) DEFAULT NULL,
  35. `active` tinyint(1) DEFAULT NULL,
  36. PRIMARY KEY (`id`),
  37. KEY `login` (`login`)
  38. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
  39. CREATE TABLE IF NOT EXISTS `ot_tariffs` (
  40. `id` int(11) NOT NULL AUTO_INCREMENT,
  41. `name` varchar(128) NOT NULL,
  42. `alias` varchar(128) NOT NULL,
  43. `fee` DOUBLE NOT NULL,
  44. `period` varchar(8) DEFAULT NULL,
  45. `percent` DOUBLE DEFAULT NULL,
  46. `main` tinyint(1) DEFAULT NULL,
  47. PRIMARY KEY (`id`)
  48. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
  49. ALTER TABLE `ot_users` ADD `addtariffid` INT NULL DEFAULT NULL AFTER `tariffid`;