记得上下班打卡 | git大法好,push需谨慎

Commit 1bca48a8 authored by anjiabin's avatar anjiabin

galaxy数据库增加索引

parent af4daea8
...@@ -19,6 +19,8 @@ create table galaxy_user_info ...@@ -19,6 +19,8 @@ create table galaxy_user_info
updated_at timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', updated_at timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB comment '数字藏品用户信息'; ) ENGINE = InnoDB comment '数字藏品用户信息';
create index gui_idx_user_id on galaxy_user_info (user_id);
drop TABLE if exists `galaxy_series_info`; drop TABLE if exists `galaxy_series_info`;
create table galaxy_series_info create table galaxy_series_info
...@@ -43,6 +45,11 @@ create table galaxy_series_info ...@@ -43,6 +45,11 @@ create table galaxy_series_info
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB comment '数字藏品系列信息'; ) ENGINE = InnoDB comment '数字藏品系列信息';
create index gsi_idx_series_code on galaxy_series_info (series_code);
create index gsi_idx_series_info_id on galaxy_series_info (series_info_id);
drop TABLE if exists `galaxy_series_nft_info`; drop TABLE if exists `galaxy_series_nft_info`;
create table galaxy_series_nft_info create table galaxy_series_nft_info
( (
...@@ -75,6 +82,10 @@ create table galaxy_series_nft_info ...@@ -75,6 +82,10 @@ create table galaxy_series_nft_info
) ENGINE = InnoDB comment '数字藏品系列nft信息'; ) ENGINE = InnoDB comment '数字藏品系列nft信息';
-- alter table galaxy_series_nft_info add nft_id_begin_index int default 0 comment 'nftId开始索引' after nft_id_begin; -- alter table galaxy_series_nft_info add nft_id_begin_index int default 0 comment 'nftId开始索引' after nft_id_begin;
-- alter table galaxy_series_nft_info add nft_publish_number int default 1 comment 'nft系列发行序号' after nft_id_begin_index; -- alter table galaxy_series_nft_info add nft_publish_number int default 1 comment 'nft系列发行序号' after nft_id_begin_index;
create index gsni_idx_series_nft_info_id on galaxy_series_nft_info (series_nft_info_id);
create index gsni_idx_series_info_id on galaxy_series_nft_info (series_info_id);
create index gsni_idx_sku_id on galaxy_series_nft_info (sku_id);
create index gsni_idx_series_code on galaxy_series_nft_info (series_code);
drop TABLE if exists `galaxy_nft_order_info`; drop TABLE if exists `galaxy_nft_order_info`;
create table galaxy_nft_order_info create table galaxy_nft_order_info
...@@ -108,6 +119,11 @@ create table galaxy_nft_order_info ...@@ -108,6 +119,11 @@ create table galaxy_nft_order_info
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB comment '数字藏品订单信息'; ) ENGINE = InnoDB comment '数字藏品订单信息';
-- alter table galaxy_nft_order_info add nft_name varchar(200) comment 'nft名字' after nft_id; -- alter table galaxy_nft_order_info add nft_name varchar(200) comment 'nft名字' after nft_id;
create index gsoi_idx_nft_order_pay_id on galaxy_nft_order_info (nft_order_pay_id);
create index gsoi_idx_user_id on galaxy_nft_order_info (user_id);
create index gsoi_idx_sku_id on galaxy_nft_order_info (sku_id);
create index gsoi_idx_series_code on galaxy_nft_order_info (series_code);
drop TABLE if exists `galaxy_nft_trade_info`; drop TABLE if exists `galaxy_nft_trade_info`;
create table galaxy_nft_trade_info create table galaxy_nft_trade_info
...@@ -131,6 +147,11 @@ create table galaxy_nft_trade_info ...@@ -131,6 +147,11 @@ create table galaxy_nft_trade_info
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB comment '数字藏品交易信息'; ) ENGINE = InnoDB comment '数字藏品交易信息';
create index gnti_idx_user_id on galaxy_nft_trade_info (user_id);
create index gnti_idx_nft_id on galaxy_nft_trade_info (nft_id);
create index gnti_idx_series_code on galaxy_nft_trade_info (series_code);
drop TABLE if exists `galaxy_nft_order_fail_log`; drop TABLE if exists `galaxy_nft_order_fail_log`;
create table galaxy_nft_order_fail_log create table galaxy_nft_order_fail_log
( (
...@@ -152,3 +173,7 @@ create table galaxy_nft_order_fail_log ...@@ -152,3 +173,7 @@ create table galaxy_nft_order_fail_log
updated_at timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', updated_at timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB comment '数字藏品发行购买失败记录表'; ) ENGINE = InnoDB comment '数字藏品发行购买失败记录表';
create index gnofl_idx_nft_order_pay_id on galaxy_nft_order_fail_log (nft_order_pay_id);
create index gnofl_idx_user_id on galaxy_nft_order_fail_log (user_id);
create index gnofl_idx_nft_id on galaxy_nft_order_fail_log (nft_id);
create index gnofl_idx_series_code on galaxy_nft_order_fail_log (series_code);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment