Skip to content

Commit

Permalink
Forbid-adding-schema-properties-if-they-existed-before (#1886)
Browse files Browse the repository at this point in the history
  • Loading branch information
abby-cyber authored Feb 3, 2023
1 parent 1691223 commit e9705ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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.

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

0 comments on commit e9705ef

Please sign in to comment.