这是indexloc提供的服务,不要输入任何密码
Skip to content

Table Tracked without PK #1269

@go4cas

Description

@go4cas

I have created my DB schema using a SQL client. Then in Hasura console, i selected to track all tables. All tables and columns are added successfully, but the primary keys are not tracked.

Sample of create:

CREATE TABLE users
(
   id                serial         NOT NULL,
   email             varchar(50)    NOT NULL,
   password          varchar(200)   NOT NULL,
   user_status_id    int            NOT NULL,
   created_at        timestamptz,
   updated_at        timestamptz
);

ALTER TABLE users
   ADD CONSTRAINT users_pkey
   PRIMARY KEY (id);

ALTER TABLE users
   ADD CONSTRAINT users_email_unique
   UNIQUE (email);

In Hasuar console, I get the following message: "There is no unique identifier (primary Key) for a row. You need at-least one primary key to allow editing,".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions