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 #1886

Merged
merged 1 commit into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all 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,12 +2,14 @@

`ALTER TAG` alters the structure of a tag with the given name in a graph space. You can add or drop properties, and change the data type of an existing property. You can also set a [TTL](../8.clauses-and-options/ttl-options.md) (Time-To-Live) on a property, or change its TTL duration.

## Prerequisites
## Notes

- Running the `ALTER TAG` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) for the graph space. Otherwise, NebulaGraph throws an error.

- Before you alter properties for a tag, make sure that the properties are not indexed. If the properties contain any indexes, the conflict error `[ERROR (-1005)]: Conflict!` will occur when you `ALTER TAG`. For more information on dropping an index, see [DROP INDEX](../14.native-index-statements/6.drop-native-index.md).

- The property name must be unique in a tag. If you add a property with the same name as an existing property or a dropped property, the operation fails.
abby-cyber marked this conversation as resolved.
Show resolved Hide resolved

## Syntax

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

`ALTER EDGE` alters the structure of an edge type with the given name in a graph space. You can add or drop properties, and change the data type of an existing property. You can also set a [TTL](../8.clauses-and-options/ttl-options.md) (Time-To-Live) on a property, or change its TTL duration.

## Prerequisites
## Notes

- Running the `ALTER EDGE` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) for the graph space. Otherwise, NebulaGraph throws an error.

- Before you alter properties for an edge type, make sure that the properties are not indexed. If the properties contain any indexes, the conflict error `[ERROR (-1005)]: Conflict!` will occur when you `ALTER EDGE`. For more information on dropping an index, see [DROP INDEX](../14.native-index-statements/6.drop-native-index.md).

- The property name must be unique in an edge type. If you add a property with the same name as an existing property or a dropped property, the operation fails.

## Syntax

```ngql
Expand Down