Skip to content

Update Select Cypher versions guide with relevant links to Operations Manual and Upgrade and migration guide #1327

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

Merged
merged 10 commits into from
Jul 2, 2025
58 changes: 13 additions & 45 deletions modules/ROOT/pages/queries/select-version.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ However, it is possible to set a different default language on both new and exis

To select a default Cypher version when creating a database, add `DEFAULT LANGUAGE <language version>` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/[`CREATE DATABASE`] statement.

[NOTE]
Setting the default language requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/dbms-administration/#access-control-dbms-administration-database-management[`SET DATABASE DEFAULT LANGUAGE` privilege].

.Select default Cypher version when creating a database
[.tabbed-example]
=====
Expand All @@ -51,11 +48,10 @@ Setting the default language requires the link:{neo4j-docs-base-uri}/operations-
.Cypher 25
[source,cypher]
----
CREATE DATABASE actors DEFAULT LANGUAGE CYPHER 25
CREATE DATABASE actors SET DEFAULT LANGUAGE CYPHER 25
----

======

[.include-with-Cypher-5]
======

Expand All @@ -70,9 +66,6 @@ CREATE DATABASE movies DEFAULT LANGUAGE CYPHER 5

To alter the default Cypher version on an existing database, add `SET DEFAULT LANGUAGE <language version>` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/[`ALTER DATABASE`] command.

[NOTE]
Altering the default language requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/dbms-administration/#access-control-dbms-administration-database-management[`SET DATABASE DEFAULT LANGUAGE` privilege].

.Alter the default Cypher version on an existing database
[.tabbed-example]
=====
Expand All @@ -86,7 +79,6 @@ ALTER DATABASE movies SET DEFAULT LANGUAGE CYPHER 25
----

======

[.include-with-Cypher-5]
======

Expand All @@ -104,44 +96,20 @@ Selecting `CYPHER 25` ensures that all queries run on that database will be exec
Selecting `CYPHER 5` as the default database language ensures that all queries run on that database uses Cypher 5 as it existed at the time of the Neo4j 2025.06 release (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 25`], which overrides this default).
Any changes introduced after the 2025.06 release will not affect the semantics of the query.

[[config-database-upgrades]]
== Cypher versions, configuration settings, and DBMS upgrades

Changing the Cypher version of new databases in a DBMS can also be done with the setting link:{neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`db.query.default_language`] (default value: `CYPHER_5`).
This setting determines the default language for new databases where it has not been specified as part of a `CREATE` or `ALTER` database command.
For example, `config_db.query.default_language=CYPHER_25` will set Cypher 25 as the default language for a DBMS.
For more information about using configuration settings, see the link:{neo4j-docs-base-uri}/operations-manual/current/configuration/[Operations Manual -> Configuration].

The table below outlines which Cypher version is assigned to databases in different upgrade or installation scenarios:

[cols="3", options="header"]
|===
| Scenario | `db.query.default_language` | Databases


| *Standard DBMS upgrade to Neo4j 2025.06+*
| Unset
| *Existing system database:* `CYPHER 5` +
*Existing user databases:* `CYPHER 5` +
*New user databases default:* `CYPHER 5`


| *Custom DBMS upgrade to Neo4j 2025.06+*
| Manually set to `CYPHER_25` by administrator
| *Existing system database:* `CYPHER 5` +
*Existing user databases:* `CYPHER 5` +
*New user databases default:* `CYPHER 25`


| *New installation of Neo4j 2025.06+*
| Set to `CYPHER_5`
| *New system database:* `CYPHER 5` +
*New user databases default:* `CYPHER 5`

For more information about how to change and view the default language of new and existing databases and remote database aliases, and the new privileges related to changing the default language, see the following links in the Operations Manual:

|===
* link:{neo4j-docs-base-uri}/operations-manual/current/configuration/cypher-version-configuration/[Configure the Cypher default version]
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#_set_a_default_cypher_version_for_a_standard_database[Set a default Cypher version for a standard database]
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/create-composite-databases/#composite-databases-default-language[Set a default Cypher version for a composite database]
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#set-default-language-for-remote-database-aliases[Set a default Cypher version for remote database aliases]
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/#alter-database-default-language[Alter the default Cypher version of an existing database]
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/alter-composite-databases/#alter-default-language-composite-database[Alter the default Cypher version of a composite database]
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#alter-default-language-remote-database-alias[Alter the default Cypher version of a remote database alias]
* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/listing-databases/#_show_the_default_cypher_version_of_a_database[Show the default Cypher version of a database]
* link:{neo4j-docs-base-uri}/operations-manual/authentication-authorization/dbms-administration/#_grant_privilege_to_modify_the_default_language_of_standard_databases[Grant privilege to modify the default language of standard databases]
* link:{neo4j-docs-base-uri}/operations-manual/authentication-authorization/dbms-administration/#grant-privilege-alter-composite-database[Grant privilege to modify composite databases] (required in order to alter the default language of a composite database)

For more information about upgrading and migrating Neo4j databases, see the link:{neo4j-docs-base-uri}/upgrade-migration-guide/current/[Upgrade and migration guide].
For information about Cypher versions and DBMS upgrades, see the link:{neo4j-docs-base-uri}/upgrade-migration-guide/current/_cypher_versions[Upgrade and migration guide -> Cypher versions].

[[migrate-queries-from-5-to-25]]
== Migrating queries from Cypher 5 to Cypher 25
Expand Down