Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design for working with primary keys #439

Closed
kgodey opened this issue Jul 19, 2021 · 5 comments
Closed

Design for working with primary keys #439

kgodey opened this issue Jul 19, 2021 · 5 comments
Labels
ready Ready for implementation type: enhancement New feature or request
Milestone

Comments

@kgodey
Copy link
Contributor

kgodey commented Jul 19, 2021

Problem

DB primary keys are used for functionality within Mathesar and we need to think through how we display them, use them, allow them to be modified, and so on.

Proposed solution

We need designs for the following functionality:

  • We should show which columns are primary keys to the user (denoting them in some special ways).
  • We should disable editing of existing primary key values in records.
  • We should show primary key constraints in the Table constraints editor and in the column information.
  • We should allow users to remove the primary key constraint for a column. If a column has no primary key, then it loses a lot of functionality and we need to warn the users about that.
  • If a user is viewing a table without a primary key or with multi-column primary keys, we should show an informational message that tells users that some features are disabled because they have no primary key or a multi-column primary key.
    • If there is no primary key, we should show the user buttons that allow them to add a primary key field with one click or convert an existing field into a primary key field.

Additional context

@github-actions
Copy link

This issue has not been updated in 90 days and is being marked as stale.

@github-actions github-actions bot added the stale label Oct 17, 2021
@kgodey kgodey removed the stale label Oct 18, 2021
@kgodey kgodey modified the milestones: [Beta] Multiple Database Support, [12] Alpha Release Dec 17, 2021
@kgodey kgodey modified the milestones: [12] Alpha Release, [10] UI Styling Mar 29, 2022
@kgodey kgodey modified the milestones: [10] UI Styling, Support for Existing Databases Jun 1, 2022
@github-actions
Copy link

This issue has not been updated in 90 days and is being marked as stale.

@github-actions github-actions bot added the stale label Dec 19, 2022
@kgodey kgodey modified the milestones: Support for Existing Databases, 2023 or later Jan 5, 2023
@pavish
Copy link
Member

pavish commented Mar 15, 2023

I believe all items in this ticket is already handled, except:

If a user is viewing a table without a primary key or with multi-column primary keys, we should show an informational message that tells users that some features are disabled because they have no primary key or a multi-column primary key.
If there is no primary key, we should show the user buttons that allow them to add a primary key field with one click or convert an existing field into a primary key field.

I'm closing this issue and opening a separate one for that: #2685.

@kgodey
Copy link
Contributor Author

kgodey commented Mar 15, 2023

I don't think we let people add and remove PKs in the constraints modal, which was also part of this ticket.

@pavish
Copy link
Member

pavish commented Mar 15, 2023

@kgodey

I don't think we let people add and remove PKs in the constraints modal, which was also part of this ticket.

Thanks for the catch, it's tracked here: #2686

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Ready for implementation type: enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

2 participants