Problem
The db create and db update commands have no way to define or modify a database's property schema. db create always produces a database with exactly one column — Name (title) — and db update can only rename the database. Any database that needs additional columns (status, select, multi-select, checkbox, date, relation, etc.) must fall back to a direct PATCH against the Notion REST API.
Source evidence
internal/cli/commands/db.go:707-763 — db create:
cmd.Flags().String("title", "", "Database title (required)")
_ = cmd.MarkFlagRequired("title")
// no --properties flag declared
body := map[string]any{
"parent": ...,
"title": ...,
"properties": map[string]any{
"Name": map[string]any{"title": map[string]any{}},
},
}
The properties payload is hard-coded. db update (db.go:765-814) is the same: only --title, body payload is just {"title": [...]}. No schema flag exists on either command.
Current behavior
$ notion-cli db create $PARENT_PAGE_ID --title "Backlog"
# Database created with one column: Name (title). No way to add more.
$ notion-cli db update $DB_ID --title "Renamed"
# Title changes. No way to add/modify/remove properties.
Expected behavior
Symmetric with page create --properties '...', e.g.:
notion-cli db create $PARENT_PAGE_ID --title "Backlog" --properties '{
"Status": { "select": { "options": [{"name":"Backlog"},{"name":"Done"}] } },
"Priority": { "select": { "options": [{"name":"P0","color":"red"}] } },
"Tags": { "multi_select": { "options": [] } },
"Owner": { "people": {} },
"Schema Impact": { "checkbox": {} }
}'
notion-cli db update $DB_ID --properties '{ "Status": null }' # delete
notion-cli db update $DB_ID --properties '{ "Effort": { "select": {"options": [{"name":"S"}]} } }' # add
Workaround
Direct API call after db create:
curl -X PATCH "https://api.notion.com/v1/data_sources/$DS_ID" \
-H "Authorization: Bearer $NOTION_TOKEN" \
-H "Notion-Version: 2025-09-03" \
-H "Content-Type: application/json" \
-d @schema.json
Impact
For any non-trivial database (kanban boards, task trackers, anything beyond a simple titled list), users must bypass the CLI and hit the Notion API directly. This is a meaningful gap for the AI-automation use case the CLI is targeted at, since agents end up needing both notion-cli auth handling and their own HTTP client.
Note: db schema already returns the full property structure (and works correctly) — only the write side is missing. The Notion API supports the symmetric schema PATCH via /v1/data_sources/{id} (new API) and /v1/databases/{id} (legacy).
Problem
The
db createanddb updatecommands have no way to define or modify a database's property schema.db createalways produces a database with exactly one column —Name(title) — anddb updatecan only rename the database. Any database that needs additional columns (status, select, multi-select, checkbox, date, relation, etc.) must fall back to a direct PATCH against the Notion REST API.Source evidence
internal/cli/commands/db.go:707-763—db create:The properties payload is hard-coded.
db update(db.go:765-814) is the same: only--title, body payload is just{"title": [...]}. No schema flag exists on either command.Current behavior
Expected behavior
Symmetric with
page create --properties '...', e.g.:Workaround
Direct API call after
db create:Impact
For any non-trivial database (kanban boards, task trackers, anything beyond a simple titled list), users must bypass the CLI and hit the Notion API directly. This is a meaningful gap for the AI-automation use case the CLI is targeted at, since agents end up needing both notion-cli auth handling and their own HTTP client.
Note:
db schemaalready returns the full property structure (and works correctly) — only the write side is missing. The Notion API supports the symmetric schema PATCH via/v1/data_sources/{id}(new API) and/v1/databases/{id}(legacy).