Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (195)
Tags (214)
master
3.0
2.6
test/null-vector-field-coverage
backup20260427-3.0
hotfix-2.6.15
2.5
fix/null-vector-query-null-rows-false-positive
test/replica-change-query-uninterrupted
fix/null-vector-query-stale-pk
test/add-vector-field-type-coverage-3.0
claude/analyze-milvus-rewriter-9ZJMs
hotfix-2.5.13
claude/fix-milvus-48442-3GVji
v2.6.15-cznoppcbwbzxsdunnzpfzf
fix/go-sdk-teardown-nil-panic
hotfix-2.6.12
hotfix-2.6.12-backfill
hotfix-2.6.14
test/e2e-fix-nonedefault-ttl-range-alias
pkg/v2.6.16
v2.6.16
v3.0-beta
pkg/v3.0-beta
client/v2.6.4
pkg/v2.6.15
v2.6.15
pkg/v2.6.14
v2.6.14
client/v2.6.3
pkg/v2.6.13
v2.6.13
pkg/v2.6.12
v2.6.12
pkg/v2.6.11
v2.6.11
pkg/v2.5.27
v2.5.27
pkg/v2.6.10
v2.6.10
master
Branches (195)
Tags (214)
master
3.0
2.6
test/null-vector-field-coverage
backup20260427-3.0
hotfix-2.6.15
2.5
fix/null-vector-query-null-rows-false-positive
test/replica-change-query-uninterrupted
fix/null-vector-query-stale-pk
test/add-vector-field-type-coverage-3.0
claude/analyze-milvus-rewriter-9ZJMs
hotfix-2.5.13
claude/fix-milvus-48442-3GVji
v2.6.15-cznoppcbwbzxsdunnzpfzf
fix/go-sdk-teardown-nil-panic
hotfix-2.6.12
hotfix-2.6.12-backfill
hotfix-2.6.14
test/e2e-fix-nonedefault-ttl-range-alias
pkg/v2.6.16
v2.6.16
v3.0-beta
pkg/v3.0-beta
client/v2.6.4
pkg/v2.6.15
v2.6.15
pkg/v2.6.14
v2.6.14
client/v2.6.3
pkg/v2.6.13
v2.6.13
pkg/v2.6.12
v2.6.12
pkg/v2.6.11
v2.6.11
pkg/v2.5.27
v2.5.27
pkg/v2.6.10
v2.6.10
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
master
Branches (195)
Tags (214)
master
3.0
2.6
test/null-vector-field-coverage
backup20260427-3.0
hotfix-2.6.15
2.5
fix/null-vector-query-null-rows-false-positive
test/replica-change-query-uninterrupted
fix/null-vector-query-stale-pk
test/add-vector-field-type-coverage-3.0
claude/analyze-milvus-rewriter-9ZJMs
hotfix-2.5.13
claude/fix-milvus-48442-3GVji
v2.6.15-cznoppcbwbzxsdunnzpfzf
fix/go-sdk-teardown-nil-panic
hotfix-2.6.12
hotfix-2.6.12-backfill
hotfix-2.6.14
test/e2e-fix-nonedefault-ttl-range-alias
pkg/v2.6.16
v2.6.16
v3.0-beta
pkg/v3.0-beta
client/v2.6.4
pkg/v2.6.15
v2.6.15
pkg/v2.6.14
v2.6.14
client/v2.6.3
pkg/v2.6.13
v2.6.13
pkg/v2.6.12
v2.6.12
pkg/v2.6.11
v2.6.11
pkg/v2.5.27
v2.5.27
pkg/v2.6.10
v2.6.10
milvus
/
scripts
/
sql
/
meta.sql
milvus
/
scripts
/
sql
/
meta.sql
meta.sql 11.11 KB
Copy Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
-- create database
CREATE DATABASE if not exists milvus_meta CHARACTER SET utf8mb4;
/*
create tables script
Notices:
1. id, tenant_id, is_deleted, created_at, updated_at are 5 common columns for all collections.
2. Query index in community version CANNOT includes tenant_id, since tenant_id is not existed and will miss query index.
*/
-- collections
CREATE TABLE if not exists milvus_meta.collections (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
collection_id BIGINT NOT NULL,
collection_name VARCHAR(256),
description VARCHAR(2048) DEFAULT NULL,
auto_id BOOL DEFAULT FALSE,
shards_num INT,
start_position TEXT,
consistency_level INT,
status INT NOT NULL,
properties VARCHAR(512),
ts BIGINT UNSIGNED DEFAULT 0,
is_deleted BOOL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
UNIQUE KEY uk_tenant_id_collection_id_ts (tenant_id, collection_id, ts)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- collection aliases
CREATE TABLE if not exists milvus_meta.collection_aliases (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
collection_id BIGINT NOT NULL,
collection_alias VARCHAR(128),
ts BIGINT UNSIGNED DEFAULT 0,
is_deleted BOOL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
UNIQUE KEY uk_tenant_id_collection_alias_ts (tenant_id, collection_alias, ts),
INDEX idx_tenant_id_collection_id_ts (tenant_id, collection_id, ts)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- channels
CREATE TABLE if not exists milvus_meta.collection_channels (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
collection_id BIGINT NOT NULL,
virtual_channel_name VARCHAR(256) NOT NULL,
physical_channel_name VARCHAR(256) NOT NULL,
removed BOOL DEFAULT FALSE,
ts BIGINT UNSIGNED DEFAULT 0,
is_deleted BOOL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
UNIQUE KEY uk_tenant_id_collection_id_virtual_channel_name_ts (tenant_id, collection_id, virtual_channel_name, ts),
INDEX idx_tenant_id_collection_id_ts (tenant_id, collection_id, ts)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- fields
CREATE TABLE if not exists milvus_meta.field_schemas (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
field_id BIGINT NOT NULL,
field_name VARCHAR(256) NOT NULL,
is_primary_key BOOL NOT NULL,
description VARCHAR(2048) DEFAULT NULL,
data_type INT UNSIGNED NOT NULL,
type_params VARCHAR(2048),
index_params VARCHAR(2048),
auto_id BOOL NOT NULL,
collection_id BIGINT NOT NULL,
ts BIGINT UNSIGNED DEFAULT 0,
is_deleted BOOL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
UNIQUE KEY uk_tenant_id_collection_id_field_name_ts (tenant_id, collection_id, field_name, ts),
INDEX idx_tenant_id_collection_id_field_id_ts (tenant_id, collection_id, field_id, ts)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- partitions
CREATE TABLE if not exists milvus_meta.`partitions` (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
partition_id BIGINT NOT NULL,
partition_name VARCHAR(256),
partition_created_timestamp bigint unsigned,
collection_id BIGINT NOT NULL,
status INT NOT NULL,
ts BIGINT UNSIGNED DEFAULT 0,
is_deleted BOOL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
UNIQUE KEY uk_tenant_id_collection_id_partition_name_ts (tenant_id, collection_id, partition_name, ts),
INDEX idx_tenant_id_collection_id_partition_id_ts (tenant_id, collection_id, partition_id, ts)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- indexes
CREATE TABLE if not exists milvus_meta.`indexes` (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
field_id BIGINT NOT NULL,
collection_id BIGINT NOT NULL,
index_id BIGINT NOT NULL,
index_name VARCHAR(256),
index_params VARCHAR(2048),
user_index_params VARCHAR(2048),
is_auto_index BOOL DEFAULT FALSE,
create_time bigint unsigned,
is_deleted BOOL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
INDEX idx_tenant_id_collection_id_index_id (tenant_id, collection_id, index_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- index file paths
CREATE TABLE if not exists milvus_meta.index_file_paths (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
index_build_id BIGINT NOT NULL,
index_file_path VARCHAR(256),
is_deleted BOOL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
INDEX idx_tenant_id_index_build_id (tenant_id, index_build_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- segments
CREATE TABLE if not exists milvus_meta.segments (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
segment_id BIGINT NOT NULL,
collection_id BIGINT NOT NULL,
partition_id BIGINT NOT NULL,
num_rows BIGINT NOT NULL,
max_row_num INT COMMENT 'estimate max rows',
dm_channel VARCHAR(128) NOT NULL,
dml_position TEXT COMMENT 'checkpoint',
start_position TEXT,
compaction_from VARCHAR(4096) COMMENT 'old segment IDs',
created_by_compaction BOOL,
segment_state TINYINT UNSIGNED NOT NULL,
last_expire_time bigint unsigned COMMENT 'segment assignment expiration time',
dropped_at bigint unsigned,
is_deleted BOOL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
INDEX idx_tenant_id_collection_id_segment_id (tenant_id, collection_id, segment_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- segment indexes
CREATE TABLE if not exists milvus_meta.segment_indexes (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
collection_id BIGINT NOT NULL,
partition_id BIGINT NOT NULL,
segment_id BIGINT NOT NULL,
field_id BIGINT NOT NULL,
index_id BIGINT NOT NULL,
index_build_id BIGINT,
enable_index BOOL NOT NULL,
create_time bigint unsigned,
index_file_keys VARCHAR(4096),
index_size BIGINT UNSIGNED,
`version` INT UNSIGNED,
is_deleted BOOL DEFAULT FALSE COMMENT 'as mark_deleted',
recycled BOOL DEFAULT FALSE COMMENT 'binlog files truly deleted',
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
UNIQUE KEY uk_tenant_id_segment_id_index_id (tenant_id, segment_id, index_id),
INDEX idx_tenant_id_collection_id_segment_id_index_id (tenant_id, collection_id, segment_id, index_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- binlog files info
CREATE TABLE if not exists milvus_meta.binlogs (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
field_id BIGINT NOT NULL,
segment_id BIGINT NOT NULL,
collection_id BIGINT NOT NULL,
log_type SMALLINT UNSIGNED NOT NULL COMMENT 'binlog、stats binlog、delta binlog',
num_entries BIGINT,
timestamp_from BIGINT UNSIGNED,
timestamp_to BIGINT UNSIGNED,
log_path VARCHAR(256) NOT NULL,
log_size BIGINT NOT NULL,
is_deleted BOOL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
INDEX idx_tenant_id_segment_id_log_type (tenant_id, segment_id, log_type)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- users
CREATE TABLE if not exists milvus_meta.credential_users (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
username VARCHAR(128) NOT NULL,
encrypted_password VARCHAR(256) NOT NULL,
is_super BOOL NOT NULL DEFAULT false,
is_deleted BOOL NOT NULL DEFAULT false,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
PRIMARY KEY (id),
INDEX idx_tenant_id_username (tenant_id, username)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- role
CREATE TABLE if not exists milvus_meta.role (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
name VARCHAR(128) NOT NULL,
is_deleted BOOL NOT NULL DEFAULT false,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
INDEX idx_role_tenant_name (tenant_id, name, is_deleted),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- user-role
CREATE TABLE if not exists milvus_meta.user_role (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
user_id BIGINT NOT NULL,
role_id BIGINT NOT NULL,
is_deleted BOOL NOT NULL DEFAULT false,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
INDEX idx_role_mapping_tenant_user_role (tenant_id, user_id, role_id, is_deleted),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- grant
CREATE TABLE if not exists milvus_meta.grant (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
role_id BIGINT NOT NULL,
object VARCHAR(128) NOT NULL,
object_name VARCHAR(128) NOT NULL,
is_deleted BOOL NOT NULL DEFAULT false,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
INDEX idx_grant_principal_resource_tenant (tenant_id, role_id, object, object_name, is_deleted),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- grant-id
CREATE TABLE if not exists milvus_meta.grant_id (
id BIGINT NOT NULL AUTO_INCREMENT,
tenant_id VARCHAR(128) DEFAULT NULL,
grant_id BIGINT NOT NULL,
grantor_id BIGINT NOT NULL,
privilege VARCHAR(128) NOT NULL,
is_deleted BOOL NOT NULL DEFAULT false,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP on update current_timestamp,
INDEX idx_grant_id_tenant_grantor (tenant_id, grant_id, grantor_id, is_deleted),
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

Releases

No release

Contributors

All

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/open_source_reference/milvus.git
git@gitee.com:open_source_reference/milvus.git
open_source_reference
milvus
milvus
master
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /