Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbid adding schema properties if they existed before #2496

Merged
merged 4 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

`ALTER TAG`语句可以修改 Tag 的结构。例如增删属性、修改数据类型,也可以为属性设置、修改 [TTL](../8.clauses-and-options/ttl-options.md)(Time-To-Live)。

## 前提条件
## 注意事项

- 登录的用户必须拥有对应权限才能执行`ALTER TAG`语句。详情请参见[内置角色权限](../../7.data-security/1.authentication/3.role-list.md)。

- 确保要修改的属性不包含索引,否则`ALTER TAG`时会报冲突错误`[ERROR (-1005)]: Conflict!`。删除索引请参见 [drop index](../14.native-index-statements/6.drop-native-index.md)。

- 确保新增的属性名不与被删除的属性名同名,否则新增属性会失败。
abby-cyber marked this conversation as resolved.
Show resolved Hide resolved

## 语法

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

`ALTER EDGE`语句可以修改 Edge type 的结构。例如增删属性、修改数据类型,也可以为属性设置、修改 [TTL](../8.clauses-and-options/ttl-options.md)(Time-To-Live)。

## 前提条件
## 注意事项

- 登录的用户必须拥有对应权限才能执行`ALTER EDGE`语句。详情请参见[内置角色权限](../../7.data-security/1.authentication/3.role-list.md)。

- 确保要修改的属性不包含索引,否则`ALTER EDGE`时会报冲突错误`[ERROR (-1005)]: Conflict!`。删除索引请参见 [drop index](../14.native-index-statements/6.drop-native-index.md)。

- 确保新增的属性名不与被删除的属性名同名,否则新增属性会失败。

## 语法

```ngql
Expand Down