chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:10:28 +08:00
commit c2acfb5f2d
267 changed files with 15542 additions and 0 deletions
+201
View File
@@ -0,0 +1,201 @@
SET character_set_client = utf8;
-- 切库:
use stock_data;
-- 建表
-- 表里面都是使用 code 和 date 两个字段做联合主键的。
CREATE TABLE IF NOT EXISTS `stock_zh_a_spot_em` (
`date` varchar(255) NOT NULL,
`code` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`last_price` double(20,2) DEFAULT NULL,
`change_percent` double(20,2) DEFAULT NULL,
`change_amount` double(20,2) DEFAULT NULL,
`volume` double(20,2) DEFAULT NULL,
`turnover` double(20,2) DEFAULT NULL,
`amplitude` double(20,2) DEFAULT NULL,
`high` double(20,2) DEFAULT NULL,
`low` double(20,2) DEFAULT NULL,
`open` double(20,2) DEFAULT NULL,
`closed` double(20,2) DEFAULT NULL,
`volume_ratio` double(20,2) DEFAULT NULL,
`turnover_rate` double(20,2) DEFAULT NULL,
`pe_ratio` double(20,2) DEFAULT NULL,
`pb_ratio` double(20,2) DEFAULT NULL,
`market_cap` double(20,2) DEFAULT NULL,
`circulating_market_cap` double(20,2) DEFAULT NULL,
`rise_speed` double(20,2) DEFAULT NULL,
`change_5min` double(20,2) DEFAULT NULL,
`change_ercent_60day` double(20,2) DEFAULT NULL,
`ytd_change_percent` double(20,2) DEFAULT NULL,
PRIMARY KEY (`code`,`date`),
KEY `idx_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE IF NOT EXISTS `stock_lhb_ggtj_sina` (
`date` varchar(255) NOT NULL,
`code` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`ranking_times` double(20,2) DEFAULT NULL,
`sum_buy` double(20,2) DEFAULT NULL,
`sum_sell` double(20,2) DEFAULT NULL,
`net_amount` double(20,2) DEFAULT NULL,
`buy_seat` double(20,2) DEFAULT NULL,
`sell_seat` double(20,2) DEFAULT NULL,
PRIMARY KEY (`code`,`date`),
KEY `idx_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `stock_dzjy_mrtj` (
`date` varchar(255) NOT NULL,
`code` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`quote_change` double(20,2) DEFAULT NULL,
`close_price` double(20,2) DEFAULT NULL,
`average_price` double(20,2) DEFAULT NULL,
`overflow_rate` double(20,2) DEFAULT NULL,
`trade_number` double(20,2) DEFAULT NULL,
`sum_volume` double(20,2) DEFAULT NULL,
`sum_turnover` double(20,2) DEFAULT NULL,
`turnover_market_rate` double(20,2) DEFAULT NULL,
PRIMARY KEY (`code`,`date`),
KEY `idx_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `guess_indicators_daily` (
`date` varchar(255) NOT NULL,
`code` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`last_price` double(20,2) DEFAULT NULL,
`change_percent` double(20,2) DEFAULT NULL,
`change_amount` double(20,2) DEFAULT NULL,
`volume` double(20,2) DEFAULT NULL,
`turnover` double(20,2) DEFAULT NULL,
`amplitude` double(20,2) DEFAULT NULL,
`high` double(20,2) DEFAULT NULL,
`low` double(20,2) DEFAULT NULL,
`open` double(20,2) DEFAULT NULL,
`closed` double(20,2) DEFAULT NULL,
`volume_ratio` double(20,2) DEFAULT NULL,
`turnover_rate` double(20,2) DEFAULT NULL,
`pe_ratio` double(20,2) DEFAULT NULL,
`pb_ratio` double(20,2) DEFAULT NULL,
`market_cap` double(20,2) DEFAULT NULL,
`circulating_market_cap` double(20,2) DEFAULT NULL,
`rise_speed` double(20,2) DEFAULT NULL,
`change_5min` double(20,2) DEFAULT NULL,
`change_ercent_60day` double(20,2) DEFAULT NULL,
`ytd_change_percent` double(20,2) DEFAULT NULL,
`boll` double(20,2) DEFAULT NULL,
`boll_lb` double(20,2) DEFAULT NULL,
`boll_ub` double(20,2) DEFAULT NULL,
`kdjd` double(20,2) DEFAULT NULL,
`kdjj` double(20,2) DEFAULT NULL,
`kdjk` double(20,2) DEFAULT NULL,
`macd` double(20,2) DEFAULT NULL,
`macdh` double(20,2) DEFAULT NULL,
`macds` double(20,2) DEFAULT NULL,
`pdi` double(20,2) DEFAULT NULL,
`trix` double(20,2) DEFAULT NULL,
`trix_9_sma` double(20,2) DEFAULT NULL,
`vr` double(20,2) DEFAULT NULL,
`vr_6_sma` double(20,2) DEFAULT NULL,
`wr_10` double(20,2) DEFAULT NULL,
`wr_6` double(20,2) DEFAULT NULL,
PRIMARY KEY (`code`,`date`),
KEY `idx_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `guess_indicators_lite_buy_daily` (
`date` varchar(255) NOT NULL,
`code` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`last_price` double(20,2) DEFAULT NULL,
`change_percent` double(20,2) DEFAULT NULL,
`change_amount` double(20,2) DEFAULT NULL,
`volume` double(20,2) DEFAULT NULL,
`turnover` double(20,2) DEFAULT NULL,
`amplitude` double(20,2) DEFAULT NULL,
`high` double(20,2) DEFAULT NULL,
`low` double(20,2) DEFAULT NULL,
`open` double(20,2) DEFAULT NULL,
`closed` double(20,2) DEFAULT NULL,
`volume_ratio` double(20,2) DEFAULT NULL,
`turnover_rate` double(20,2) DEFAULT NULL,
`pe_ratio` double(20,2) DEFAULT NULL,
`pb_ratio` double(20,2) DEFAULT NULL,
`market_cap` double(20,2) DEFAULT NULL,
`circulating_market_cap` double(20,2) DEFAULT NULL,
`rise_speed` double(20,2) DEFAULT NULL,
`change_5min` double(20,2) DEFAULT NULL,
`change_ercent_60day` double(20,2) DEFAULT NULL,
`ytd_change_percent` double(20,2) DEFAULT NULL,
`boll` double(20,2) DEFAULT NULL,
`boll_lb` double(20,2) DEFAULT NULL,
`boll_ub` double(20,2) DEFAULT NULL,
`kdjd` double(20,2) DEFAULT NULL,
`kdjj` double(20,2) DEFAULT NULL,
`kdjk` double(20,2) DEFAULT NULL,
`macd` double(20,2) DEFAULT NULL,
`macdh` double(20,2) DEFAULT NULL,
`macds` double(20,2) DEFAULT NULL,
`pdi` double(20,2) DEFAULT NULL,
`trix` double(20,2) DEFAULT NULL,
`trix_9_sma` double(20,2) DEFAULT NULL,
`vr` double(20,2) DEFAULT NULL,
`vr_6_sma` double(20,2) DEFAULT NULL,
`wr_10` double(20,2) DEFAULT NULL,
`wr_6` double(20,2) DEFAULT NULL,
PRIMARY KEY (`code`,`date`),
KEY `idx_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `guess_indicators_lite_sell_daily` (
`date` varchar(255) NOT NULL,
`code` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`last_price` double(20,2) DEFAULT NULL,
`change_percent` double(20,2) DEFAULT NULL,
`change_amount` double(20,2) DEFAULT NULL,
`volume` double(20,2) DEFAULT NULL,
`turnover` double(20,2) DEFAULT NULL,
`amplitude` double(20,2) DEFAULT NULL,
`high` double(20,2) DEFAULT NULL,
`low` double(20,2) DEFAULT NULL,
`open` double(20,2) DEFAULT NULL,
`closed` double(20,2) DEFAULT NULL,
`volume_ratio` double(20,2) DEFAULT NULL,
`turnover_rate` double(20,2) DEFAULT NULL,
`pe_ratio` double(20,2) DEFAULT NULL,
`pb_ratio` double(20,2) DEFAULT NULL,
`market_cap` double(20,2) DEFAULT NULL,
`circulating_market_cap` double(20,2) DEFAULT NULL,
`rise_speed` double(20,2) DEFAULT NULL,
`change_5min` double(20,2) DEFAULT NULL,
`change_ercent_60day` double(20,2) DEFAULT NULL,
`ytd_change_percent` double(20,2) DEFAULT NULL,
`boll` double(20,2) DEFAULT NULL,
`boll_lb` double(20,2) DEFAULT NULL,
`boll_ub` double(20,2) DEFAULT NULL,
`kdjd` double(20,2) DEFAULT NULL,
`kdjj` double(20,2) DEFAULT NULL,
`kdjk` double(20,2) DEFAULT NULL,
`macd` double(20,2) DEFAULT NULL,
`macdh` double(20,2) DEFAULT NULL,
`macds` double(20,2) DEFAULT NULL,
`pdi` double(20,2) DEFAULT NULL,
`trix` double(20,2) DEFAULT NULL,
`trix_9_sma` double(20,2) DEFAULT NULL,
`vr` double(20,2) DEFAULT NULL,
`vr_6_sma` double(20,2) DEFAULT NULL,
`wr_10` double(20,2) DEFAULT NULL,
`wr_6` double(20,2) DEFAULT NULL,
PRIMARY KEY (`code`,`date`),
KEY `idx_code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
+38
View File
@@ -0,0 +1,38 @@
# https://blog.csdn.net/aichogn/article/details/117788275
# mysql 推荐配置
[client]
socket=/var/lib/mysql/mysql.sock
port=3306
[mysqld]
basedir=/var/lib/mysql/
datadir=/var/lib/mysql/data
socket=/var/lib/mysql/mysql.sock
default-storage-engine=INNODB
character_set_server=utf8mb4
collation_server=utf8mb4_general_ci
port=3306
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
server_id=1
## 最大连接数,MySQL服务器允许的最大连接数16384,连接数越多消耗内存越多
max_connections = 1000
## 日志过期时间,包括二进制日志(过期自动删除)
# expire_logs_days = 15
## Enable Per Table Data for InnoDB to shrink ibdata1(innoDB表优化)
innodb_file_per_table = 1
#默认128M,用于存储页面缓存数据外,另外正常情况下还有大约8%的开销,主要用在每个缓存页帧的描述、adaptive hash等数据结构,适当的增加这个参数的大小,可以有效的减少 InnoDB 类型的表的磁盘 I/O
innodb_buffer_pool_size = 2048M
innodb_log_file_size = 512M
#默认是8MB,InnoDB在写事务日志的时候,为了提高性能,也是先将信息写入Innofb Log Buffer中,当满足innodb_flush_log_trx_commit参数所设置的相应条件(或者日志缓冲区写满)之后,才会将日志写到文件 (或者同步到磁盘)中
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
#表大小写不敏感
lower_case_table_names=1
#跳过密码 安装完后屏蔽该选项
#skip-grant-tables
#关闭 binlog
skip-log-bin