Skip to content

Commit

Permalink
Update alter (#1921)
Browse files Browse the repository at this point in the history
* Update alter

* Update docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md

* Update docs-2.0/3.ngql-guide/11.edge-type-statements/3.alter-edge.md

* Update 3.alter-edge.md

* Update docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md

* Update docs-2.0/3.ngql-guide/10.tag-statements/3.alter-tag.md

---------

Co-authored-by: cooper-lzy <78672629+cooper-lzy@users.noreply.github.com>
Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 7, 2023
1 parent 13e461b commit 7d96809
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 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 @@ -10,6 +10,11 @@

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

- Only the length of a `FIXED_STRING` or an `INT` can be increased.

- Only the data type conversions from FIXED_STRING to STRING and from FLOAT to DOUBLE are allowed.


## Syntax

```ngql
Expand Down Expand Up @@ -41,6 +46,9 @@ nebula> ALTER TAG t1 ADD (p3 int, p4 string);
nebula> ALTER TAG t1 TTL_DURATION = 2, TTL_COL = "p2";
nebula> ALTER TAG t1 COMMENT = 'test1';
nebula> ALTER TAG t1 ADD (p5 double NOT NULL DEFAULT 0.4 COMMENT 'p5') COMMENT='test2';
// Change the `p3` property to INT8
nebula> ALTER TAG t1 CHANGE (p3 int8, p4 string);
[ERROR(-1005)]: Unsupported!
```

## Implementation of the operation
Expand Down
4 changes: 4 additions & 0 deletions docs-2.0/3.ngql-guide/11.edge-type-statements/3.alter-edge.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

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

- Only the length of a `FIXED_STRING` or an `INT` can be increased.

- Only the data type conversions from FIXED_STRING to STRING and from FLOAT to DOUBLE are allowed.

## Syntax

```ngql
Expand Down

0 comments on commit 7d96809

Please sign in to comment.