Skip to content

Commit 83c96e6

Browse files
nerpaulaSimran-B
andauthored
DOC-614 | Add behavior change when dropping a collection from a graph (#447)
* prevent dropping a collection from a graph * add API changes * Apply suggestions from code review --------- Co-authored-by: Simran Spiller <[email protected]>
1 parent 8515e34 commit 83c96e6

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

site/content/3.12/release-notes/version-3.12/api-changes-in-3-12.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,31 @@ characters using the default settings.
4141

4242
#### Collection API
4343

44+
##### Warnings for invalid collection creation options
45+
4446
When creating a collection using the `POST /_api/collection` endpoint, the
4547
server log now displays a deprecation message if illegal combinations and
4648
unknown attributes and values are detected in the request body.
4749

4850
Note that all invalid elements and combinations will be rejected in future
4951
versions.
5052

53+
##### Dropping graph collections disallowed
54+
55+
Dropping a collection using the `DELETE /_api/collection/{collection-name}`
56+
endpoint now strictly enforces that graph definitions remain intact.
57+
Previously, it was allowed to drop collections that were part of an existing graph.
58+
Trying to do so now results in the error `ERROR_GRAPH_MUST_NOT_DROP_COLLECTION`
59+
with the number `1942`.
60+
61+
This may require changes in the client application code that drops individual
62+
collections from graphs for clean-up purposes. You can drop an entire graph
63+
and its collections along with it, as long as they aren't used in another graph.
64+
To remove individual collections, update or remove edge definitions first to not
65+
include the desired collections anymore. In case of vertex collections, they
66+
become orphan collections that you need to remove from the graph definition as
67+
well to drop the collections.
68+
5169
#### Index API
5270

5371
##### Stored values can contain the `_id` attribute

site/content/3.12/release-notes/version-3.12/incompatible-changes-in-3-12.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,21 @@ changed in the documents of SmartGraph vertex collections. This is now strictly
136136
See [API Changes in ArangoDB 3.12](api-changes-in-3-12.md#validation-of-smartgraphattribute-in-smartgraphs)
137137
for details and instructions on how to repair affected attributes.
138138

139+
## Dropping graph collections disallowed
140+
141+
Dropping a collection now strictly enforces that graph definitions remain intact.
142+
Previously, it was allowed to drop collections that were part of an existing graph.
143+
Trying to do so now results in the error `ERROR_GRAPH_MUST_NOT_DROP_COLLECTION`
144+
with the number `1942`.
145+
146+
This may require changes in the client application code that drops individual
147+
collections from graphs for clean-up purposes. You can drop an entire graph
148+
and its collections along with it, as long as they aren't used in another graph.
149+
To remove individual collections, update or remove edge definitions first to not
150+
include the desired collections anymore. In case of vertex collections, they
151+
become orphan collections that you need to remove from the graph definition as
152+
well to drop the collections.
153+
139154
## Client tools
140155

141156
### jslint feature in arangosh

0 commit comments

Comments
 (0)