Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
54cab09
up to set graph type on a populated database
JPryce-Aklundh Sep 18, 2025
b226603
constraints slice, graph type set, add and alter
JPryce-Aklundh Sep 22, 2025
3315534
show and drop
JPryce-Aklundh Sep 22, 2025
f598cc9
add show constraints details
JPryce-Aklundh Sep 22, 2025
e625176
syntax, fixes, and additions
JPryce-Aklundh Sep 23, 2025
5f55cae
post-review corrections (non-graph types pages)
JPryce-Aklundh Sep 23, 2025
462834c
post-review corrections 2 (syntax page)
JPryce-Aklundh Sep 24, 2025
e0ae07f
rename alter and fix prefered wording
JPryce-Aklundh Sep 24, 2025
6f44951
preferred variants
JPryce-Aklundh Sep 24, 2025
024aaa2
post review corrections 3 (more syntax)
JPryce-Aklundh Sep 24, 2025
51142ac
post review corrections 4 (main graph types pages)
JPryce-Aklundh Sep 25, 2025
bf58dc3
forgotten DROP improvements
JPryce-Aklundh Sep 25, 2025
463f2f8
fix formatting
JPryce-Aklundh Sep 25, 2025
85613b8
table formatting
JPryce-Aklundh Sep 25, 2025
a8da38e
additional entry on additions page
JPryce-Aklundh Sep 25, 2025
b70d620
post review corrections 5 (misc)
JPryce-Aklundh Sep 25, 2025
beac214
add page aliases (given similar restructure in 5 manual)
JPryce-Aklundh Sep 26, 2025
450b90b
cheat sheet tags
JPryce-Aklundh Sep 30, 2025
7c975eb
fix incorrect tags
JPryce-Aklundh Sep 30, 2025
631cb3f
Update modules/ROOT/pages/schema/graph-types/alter-element-types.adoc
rsill-neo4j Oct 2, 2025
ba55ab6
Merge branch 'dev' into graph-types
rsill-neo4j Oct 2, 2025
7ebebbb
Apply suggestions from code review
rsill-neo4j Oct 17, 2025
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
2 changes: 1 addition & 1 deletion modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
** xref:schema/graph-types/index.adoc[]
*** xref:schema/graph-types/set-graph-types.adoc[]
*** xref:schema/graph-types/extend-graph-types.adoc[]
*** xref:schema/graph-types/alter-graph-types.adoc[]
*** xref:schema/graph-types/alter-element-types.adoc[]
*** xref:schema/graph-types/list-graph-types.adoc[]
*** xref:schema/graph-types/drop-graph-type-elements.adoc[]
** xref:schema/constraints/index.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ ALTER CURRENT GRAPH TYPE ALTER {
}
----

| Introduced the ability to alter graph types using the `ALTER CURRENT GRAPH TYPE ALTER` command.
For more information, see xref:schema/graph-types/alter-graph-types.adoc[].
| Introduced the ability to alter element types in a graph type using the `ALTER CURRENT GRAPH TYPE ALTER` command.
For more information, see xref:schema/graph-types/alter-element-types.adoc[].

a|
label:functionality[]
Expand All @@ -137,7 +137,7 @@ ALTER CURRENT GRAPH DROP {
}
----

| Introduced the ability to drop elements from graph types using the `ALTER CURRENT GRAPH TYPE DROP` command.
| Introduced the ability to drop element types and constraints from graph types using the `ALTER CURRENT GRAPH TYPE DROP` command.
For more information, see xref:schema/graph-types/drop-graph-type-elements.adoc[].
|===

Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/pages/schema/constraints/drop-constraints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ Removed 1 constraint.
Constraints that are created as part of xref:schema/graph-types/set-graph-types.adoc#node-element-types[node] or xref:schema/graph-types/set-graph-types.adoc#relationship-element-types[relationship element types] in a xref:schema/graph-types/index.adoc[graph type] cannot be dropped with the `DROP CONSTRAINT constraint_name` command.
This includes the following constraints:

* Property existence and property type constraints on identifying labels or relationship types
* Property existence and property type constraints on identifying node labels or relationship types
* Node label existence constraints
* Relationship source and target label constraints

These constraints can only be dropped by dropping the full node or relationship element type.
For more information, see xref:schema/graph-types/drop-graph-type-elements.adoc#drop-element-types[Drop node and relationship element types]
For more information, see xref:schema/graph-types/drop-graph-type-elements.adoc#drop-element-types[Drop node and relationship element types].
====

[[drop-constraint-with-parameter]]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/schema/constraints/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The following constraints are available in Neo4j:
* xref:schema/constraints/create-constraints.adoc#create-property-type-constraints[Property type constraints]: ensure that a property has the required property type for all nodes with a specific label or for all relationships with a specific type. label:enterprise-edition[]
* xref:schema/constraints/create-constraints.adoc#create-key-constraints[Key constraints]: ensure that all properties exist and that the combined property values are unique for all nodes with a specific label or all relationships with a specific type.label:enterprise-edition[]

For more information index-backed constraints, constraint creation failures and data violation scenarios, as well as listing and dropping constraints, see:
For more information about index-backed constraints, constraint creation failures and data violation scenarios, as well as creating, listing and dropping constraints, see:

* xref:schema/constraints/create-constraints.adoc[]
* xref:schema/constraints/list-constraints.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ The list returned will only include a single value (the name of the constrained
| LIST<STRING>

| enforcedLabel
| The implied labels required by a node label existence constraint or the source node and target node labels required by a relationship source or target label constraint. label:default-output[] label:cypher[Cypher 25 only] label:new[Introduced in Neo4j 2025.xx]
| The implied labels required by a node label existence constraint or the source node and target node labels required by a relationship source or target label constraint, or `null` for other constraints which do not constrain labels. label:default-output[] label:cypher[Cypher 25 only] label:new[Introduced in Neo4j 2025.xx]
| STRING

| ownedIndex
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
:description: Information about altering a graph type.
:page-role: cypher-25-only new-neo4j-2025.xx enterprise-edition
= Alter graph types
= Alter element types

A graph type can be altered using the `ALTER CURRENT GRAPH TYPE ALTER` command.
This command is used to modify existing xref:schema/graph-types/set-graph-types.adoc#node-element-types[node] and xref:schema/graph-types/set-graph-types.adoc#relationship-element-types[relationship element types] in a graph type.
The xref:schema/graph-types/set-graph-types.adoc#node-element-types[node] and xref:schema/graph-types/set-graph-types.adoc#relationship-element-types[relationship element types] in a graph type can be altered using the `ALTER CURRENT GRAPH TYPE ALTER` command.
When altering a graph type, only those node or relationship element types to be modified should be included.

[NOTE]
====
Setting a graph type requires the following privileges:
Altering element types in a graph type requires the following privileges:
* link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-constraints[`CREATE CONSTRAINT`]
* link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-constraints[`DROP CONSTRAINT`]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
:description: Information about dropping elements in a graph type.
:page-role: cypher-25-only new-neo4j-2025.xx enterprise-edition
= Drop elements in a graph type
= Drop graph type elements

The `ALTER CURRENT GRAPH TYPE DROP` command allows you to drop elements from a graph type.
The `ALTER CURRENT GRAPH TYPE DROP` command allows you to drop element types and constraints from a graph type.

[NOTE]
Dropping elements from a graph type the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-constraints[`DROP CONSTRAINT` privilege].
Dropping element types and constraints from a graph type the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-constraints[`DROP CONSTRAINT` privilege].

.Set graph type
[source, cypher]
Expand All @@ -28,7 +28,7 @@ ALTER CURRENT GRAPH TYPE SET {
[[drop-element-types]]
== Drop node and relationship element types

To fully drop a node or relationship element type, it is only necessary to define its identifying node label/relationship type appended with `\=>`.
To fully drop a xref:schema/graph-types/set-graph-types.adoc#node-element-types[node] or xref:schema/graph-types/set-graph-types.adoc#relationship-element-types[relationship element type], it is only necessary to define its identifying node label/relationship type appended with `\=>`.

.Drop node and relationship element types
[source, cypher]
Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/pages/schema/graph-types/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Graph types allow you to specify a graph schema for a database.

When a database is created, it has an empty graph type, meaning it is free from any constraints on what can be stored in a database.
Creating a graph type, typically done following the creation of a database, enables users to impose a schema on the nodes, relationships, and properties included in the graph type, thereby ensuring the integrity and quality of the data in a graph.
Setting a graph type, typically done following the creation of a database, enables users to impose a schema on the nodes, relationships, and properties included in the graph type, thereby ensuring the integrity and quality of the data in a graph.

Cypher supports open graph types, meaning that a graph type only constrains the data included by the graph type.
It does not impose any constraints on nodes, relationships, and properties not included by the graph type.
Expand All @@ -14,7 +14,7 @@ For more information about working with graph types, see:

* xref:schema/graph-types/set-graph-types.adoc[]
* xref:schema/graph-types/extend-graph-types.adoc[]
* xref:schema/graph-types/alter-graph-types.adoc[]
* xref:schema/graph-types/alter-element-types.adoc[]
* xref:schema/graph-types/list-graph-types.adoc[]
* xref:schema/graph-types/drop-graph-type-elements.adoc[]

Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/pages/schema/graph-types/list-graph-types.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ Regardless of which syntax was used to define a property uniqueness or key const

To only return the graph type `specification`, use the command `SHOW CURRENT GRAPH TYPE YIELD specification`.

[[return-columns]]
== Return columns for `SHOW CURRENT GRAPH TYPE`
[[result-columns]]
== Result columns for `SHOW CURRENT GRAPH TYPE`

There are two return columns for `SHOW CURRENT GRAPH TYPE`: `type` and `specification`.
Both are returned by default.
Expand Down
Loading