Skip to content

Frontend support for tables without single-column primary keys #396

Closed
@kgodey

Description

@kgodey

Problem

Currently, we assume that tables have single-column primary keys. We need to explicitly handle tables without primary keys or with multi-column primary keys to prevent unexpected behavior or errors.

Proposed solution

We need to make the following changes in the frontend:

  • Disable infinite scroll for tables without primary keys or with multi-column primary keys. Pagination should be used instead.
  • Disable editing and deleting rows for tables without primary keys or with multi-column primary keys.
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: unblockingBlocked by other workwork: frontendRelated to frontend code in the mathesar_ui directory

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions