Collection.create()
Create a collection.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
data |
Yes |
Object describing the collection. |
data fields
Name | Type | Required | Description |
---|---|---|---|
name |
Yes |
Name of the collection to create.
The name must match the following regular expression but can’t be a
single underscore or reserved word:
|
|
history_days |
Number of days to retain the document in the collection. |
||
ttl_days |
Delete documents |
||
data |
Metadata for the collection. Useful for describing a collection beyond its name. |
Examples
{
name: "Activities",
coll: Collection,
ts: Time("2023-02-18T20:49:36.680Z"),
indexes: {},
constraints: []
}
See also
definition
Collection document definition to delete a collection.
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!