create_collection
Create a new collection in Directus, automatically generating a database table with schema. Optionally include initial fields.
Instructions
Create a new collection (database table) in Directus. Automatically creates a proper database table with schema. Can include initial fields. Example: {collection: "articles", meta: {icon: "article", note: "Blog articles"}, fields: [{field: "id", type: "integer", schema: {is_primary_key: true, has_auto_increment: true}}, {field: "title", type: "string"}]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | Yes | Collection name (table name) | |
| meta | No | Collection metadata | |
| schema | No | Database schema configuration | |
| fields | No | Fields to create with the collection |