68 lines
3.0 KiB
SQL
68 lines
3.0 KiB
SQL
-- MySQL dump 10.14 Distrib 5.5.41-MariaDB, for Linux (x86_64)
|
|
--
|
|
-- Host: localhost Database: bcevent
|
|
-- ------------------------------------------------------
|
|
-- Server version 5.5.41-MariaDB
|
|
|
|
--
|
|
-- Table structure for table `version`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `version`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `version` (
|
|
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
|
`version` int(11) NOT NULL DEFAULT '0' COMMENT '版本号',
|
|
PRIMARY KEY (`idx`),
|
|
UNIQUE KEY `version` (`version`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `t_blockchain_event`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `t_blockchain_event`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `t_blockchain_event` (
|
|
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
|
`txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash',
|
|
`log_index` bigint NOT NULL DEFAULT '0' COMMENT 'log_index',
|
|
`hash_code` varchar(60) NOT NULL DEFAULT '' COMMENT 'hash_code',
|
|
`net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
|
|
`event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
|
|
`contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
|
|
`contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
|
|
`block_number` bigint NOT NULL DEFAULT '0' COMMENT 'block_number',
|
|
`raw_data` mediumblob COMMENT 'raw_data',
|
|
`return_values` mediumblob COMMENT 'return_values',
|
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
|
PRIMARY KEY (`idx`),
|
|
UNIQUE KEY `unikey` (`txhash`, `hash_code`, `log_index`, `net_id`, `event_name`, `contract_address`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `t_last_block`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `t_last_block`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
CREATE TABLE `t_last_block` (
|
|
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
|
`net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
|
|
`contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
|
|
`contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
|
|
`event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
|
|
`block_number` bigint NOT NULL DEFAULT '0' COMMENT 'block_number',
|
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
|
PRIMARY KEY (`idx`),
|
|
UNIQUE KEY `unikey` (`net_id`, `contract_address`, `event_name`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|