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

Update alter #1921

Merged
merged 7 commits into from
Feb 7, 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
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