begin;

alter table t_blockchain_event add column `block_data` mediumblob COMMENT 'block_data';
alter table t_721nft_transfer add column `block_data` mediumblob COMMENT 'block_data';
alter table t_nftmarket add column `block_data` mediumblob COMMENT 'block_data';
alter table t_gameitemmall add column `block_data` mediumblob COMMENT 'block_data';
alter table t_gameitemmarket add column `block_data` mediumblob COMMENT 'block_data';
alter table t_active_721nft add column `block_data` mediumblob COMMENT 'block_data';

CREATE TABLE `t_erc721_staking` (
  `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',
  `return_values` mediumblob COMMENT 'return_values',
  `block_data` mediumblob COMMENT 'block_data',
  `src_idx` bigint NOT NULL DEFAULT '0' COMMENT 'src_idx',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status 0：待处理 1：已处理',
  `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`),
  KEY `net_id_event_name_contract_address` (`net_id`, `event_name`, `contract_address`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

insert into version (version) values(2023083001);

commit;
