[GH-ISSUE #2460] [FR] Primary field for database #1058

Closed
opened 2026-03-23 20:45:01 +00:00 by mirror · 0 comments
Owner

Originally created by @richardshiue on GitHub (May 5, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2460

Description

In every database, there is a default field that is marked "primary" in the code and cannot be deleted. While intuitive at first, this behavior isn't properly communicated to users. This may cause some problems when users start to re-arrange the order columns. After some time, it may confusing as to why a certain field cannot be deleted, and yet behaves exactly the same as other columns: change the name and field type (text, number, etc). Worse still if the user decided to delete or modify other columns, not knowing that there is a particular column that can't be deleted.

I can think of two possible solutions:

  1. Show the disabled cursor when hovering over the delete field button, with a tooltip explaining that the field is primary, or
  2. Introduce a title field type that cannot be changed or deleted. I'm leaning more towards this one, as I'd also like to restrict the contents of the fields to specifically single-line plaintext. (Currently by default, it can take in multi-line text, or if converted to another field type, dates, URLs, etc.) Furthermore, this will be the title of the page in #2418.

Impact

Database users

Additional Context

No response

Originally created by @richardshiue on GitHub (May 5, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2460 ### Description In every database, there is a default field that is marked "primary" in the code and cannot be deleted. While intuitive at first, this behavior isn't properly communicated to users. This may cause some problems when users start to re-arrange the order columns. After some time, it may confusing as to why a certain field cannot be deleted, and yet behaves exactly the same as other columns: change the name and field type (text, number, etc). Worse still if the user decided to delete or modify other columns, not knowing that there is a particular column that can't be deleted. I can think of two possible solutions: 1. Show the disabled cursor when hovering over the delete field button, with a tooltip explaining that the field is primary, or 2. Introduce a title field type that cannot be changed or deleted. I'm leaning more towards this one, as I'd also like to restrict the contents of the fields to specifically single-line plaintext. (Currently by default, it can take in multi-line text, or if converted to another field type, dates, URLs, etc.) Furthermore, this will be the title of the page in #2418. ### Impact Database users ### Additional Context _No response_
mirror 2026-03-23 20:45:01 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#1058
No description provided.