Advertisement
Guest User

mysql burstdb schema v01

a guest
May 17th, 2015
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.65 KB | None | 0 0
  1. -- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (x86_64)
  2. --
  3. -- Host: localhost Database: burstdb
  4. -- ------------------------------------------------------
  5. -- Server version 5.5.43-0ubuntu0.14.10.1
  6.  
  7. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  8. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  9. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  10. /*!40101 SET NAMES utf8 */;
  11. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  12. /*!40103 SET TIME_ZONE='+00:00' */;
  13. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  14. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  15. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  16. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  17.  
  18. --
  19. -- Table structure for table `blocks`
  20. --
  21.  
  22. DROP TABLE IF EXISTS `blocks`;
  23. /*!40101 SET @saved_cs_client = @@character_set_client */;
  24. /*!40101 SET character_set_client = utf8 */;
  25. CREATE TABLE `blocks` (
  26. `idblocks` int(10) unsigned NOT NULL AUTO_INCREMENT,
  27. `height` bigint(20) NOT NULL,
  28. `scoop` int(11) NOT NULL,
  29. `target` varchar(45) NOT NULL,
  30. `reward` float NOT NULL,
  31. `miner` varchar(45) NOT NULL,
  32. `time` varchar(45) NOT NULL,
  33. `txids` int(11) NOT NULL,
  34. PRIMARY KEY (`idblocks`),
  35. UNIQUE KEY `height_UNIQUE` (`height`),
  36. KEY `reward` (`reward`),
  37. KEY `miner` (`miner`),
  38. KEY `height` (`height`),
  39. KEY `scoop` (`scoop`),
  40. KEY `target` (`target`),
  41. KEY `time` (`time`)
  42. ) ENGINE=InnoDB AUTO_INCREMENT=99691 DEFAULT CHARSET=latin1;
  43. /*!40101 SET character_set_client = @saved_cs_client */;
  44.  
  45. --
  46. -- Table structure for table `dbstate`
  47. --
  48.  
  49. DROP TABLE IF EXISTS `dbstate`;
  50. /*!40101 SET @saved_cs_client = @@character_set_client */;
  51. /*!40101 SET character_set_client = utf8 */;
  52. CREATE TABLE `dbstate` (
  53. `iddbstate` int(10) unsigned NOT NULL,
  54. `last_block` bigint(20) NOT NULL,
  55. PRIMARY KEY (`iddbstate`)
  56. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  57. /*!40101 SET character_set_client = @saved_cs_client */;
  58.  
  59. --
  60. -- Temporary table structure for view `my_polo_deposits`
  61. --
  62.  
  63. DROP TABLE IF EXISTS `my_polo_deposits`;
  64. /*!50001 DROP VIEW IF EXISTS `my_polo_deposits`*/;
  65. SET @saved_cs_client = @@character_set_client;
  66. SET character_set_client = utf8;
  67. /*!50001 CREATE TABLE `my_polo_deposits` (
  68. `recieved` tinyint NOT NULL
  69. ) ENGINE=MyISAM */;
  70. SET character_set_client = @saved_cs_client;
  71.  
  72. --
  73. -- Temporary table structure for view `reward_richlist`
  74. --
  75.  
  76. DROP TABLE IF EXISTS `reward_richlist`;
  77. /*!50001 DROP VIEW IF EXISTS `reward_richlist`*/;
  78. SET @saved_cs_client = @@character_set_client;
  79. SET character_set_client = utf8;
  80. /*!50001 CREATE TABLE `reward_richlist` (
  81. `miner` tinyint NOT NULL,
  82. `mined` tinyint NOT NULL,
  83. `mined_blocks` tinyint NOT NULL,
  84. `avg_reward` tinyint NOT NULL
  85. ) ENGINE=MyISAM */;
  86. SET character_set_client = @saved_cs_client;
  87.  
  88. --
  89. -- Table structure for table `tx`
  90. --
  91.  
  92. DROP TABLE IF EXISTS `tx`;
  93. /*!40101 SET @saved_cs_client = @@character_set_client */;
  94. /*!40101 SET character_set_client = utf8 */;
  95. CREATE TABLE `tx` (
  96. `idtx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  97. `transaction` varchar(45) DEFAULT NULL,
  98. `amountNQT` bigint(20) DEFAULT NULL,
  99. `height` bigint(20) DEFAULT NULL,
  100. `recipientRS` varchar(45) DEFAULT NULL,
  101. `type` int(11) DEFAULT NULL,
  102. `feeNQT` bigint(20) DEFAULT NULL,
  103. `recipient` bigint(20) DEFAULT NULL,
  104. `sender` bigint(20) DEFAULT NULL,
  105. `subtype` int(11) DEFAULT NULL,
  106. `deadline` bigint(20) DEFAULT NULL,
  107. `senderRS` varchar(45) DEFAULT NULL,
  108. PRIMARY KEY (`idtx`),
  109. KEY `transaction` (`transaction`),
  110. KEY `amountNQT` (`amountNQT`),
  111. KEY `height` (`height`),
  112. KEY `recipientRS` (`recipientRS`),
  113. KEY `type` (`type`),
  114. KEY `feeNQT` (`feeNQT`),
  115. KEY `recipient` (`recipient`),
  116. KEY `sender` (`sender`),
  117. KEY `subtype` (`subtype`),
  118. KEY `deadline` (`deadline`),
  119. KEY `senderRS` (`senderRS`)
  120. ) ENGINE=InnoDB AUTO_INCREMENT=1928903 DEFAULT CHARSET=latin1;
  121. /*!40101 SET character_set_client = @saved_cs_client */;
  122.  
  123.  
  124. --
  125. -- Final view structure for view `my_polo_deposits`
  126. --
  127.  
  128. /*!50001 DROP TABLE IF EXISTS `my_polo_deposits`*/;
  129. /*!50001 DROP VIEW IF EXISTS `my_polo_deposits`*/;
  130. /*!50001 SET @saved_cs_client = @@character_set_client */;
  131. /*!50001 SET @saved_cs_results = @@character_set_results */;
  132. /*!50001 SET @saved_col_connection = @@collation_connection */;
  133. /*!50001 SET character_set_client = utf8 */;
  134. /*!50001 SET character_set_results = utf8 */;
  135. /*!50001 SET collation_connection = utf8_general_ci */;
  136. /*!50001 CREATE ALGORITHM=UNDEFINED */
  137. /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
  138. /*!50001 VIEW `my_polo_deposits` AS select `tx`.`recipientRS` AS `recieved` from `tx` where `tx`.`recipientRS` in (select `tx`.`recipientRS` from `tx` where (`tx`.`recipientRS` = 'BURST-R8SQ-TUEM-DTHQ-7ATA3')) */;
  139. /*!50001 SET character_set_client = @saved_cs_client */;
  140. /*!50001 SET character_set_results = @saved_cs_results */;
  141. /*!50001 SET collation_connection = @saved_col_connection */;
  142.  
  143. --
  144. -- Final view structure for view `reward_richlist`
  145. --
  146.  
  147. /*!50001 DROP TABLE IF EXISTS `reward_richlist`*/;
  148. /*!50001 DROP VIEW IF EXISTS `reward_richlist`*/;
  149. /*!50001 SET @saved_cs_client = @@character_set_client */;
  150. /*!50001 SET @saved_cs_results = @@character_set_results */;
  151. /*!50001 SET @saved_col_connection = @@collation_connection */;
  152. /*!50001 SET character_set_client = utf8 */;
  153. /*!50001 SET character_set_results = utf8 */;
  154. /*!50001 SET collation_connection = utf8_general_ci */;
  155. /*!50001 CREATE ALGORITHM=UNDEFINED */
  156. /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
  157. /*!50001 VIEW `reward_richlist` AS select `blocks`.`miner` AS `miner`,sum(`blocks`.`reward`) AS `mined`,count(`blocks`.`miner`) AS `mined_blocks`,(sum(`blocks`.`reward`) / count(`blocks`.`miner`)) AS `avg_reward` from `blocks` group by `blocks`.`miner` order by sum(`blocks`.`reward`) desc */;
  158. /*!50001 SET character_set_client = @saved_cs_client */;
  159. /*!50001 SET character_set_results = @saved_cs_results */;
  160. /*!50001 SET collation_connection = @saved_col_connection */;
  161. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  162.  
  163. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  164. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  165. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  166. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  167. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  168. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  169. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  170.  
  171. -- Dump completed on 2015-05-17 2:03:45
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement