Database Viewer Crashes Entire Site if Table doesn't have Primary Key
ae-hopscotch
HOBBYOP

a year ago

Steps to reproduce:

  1. Create a new project

  2. Provision a PostgreSQL Database with default settings

  3. Add a table to the database with no primary key. (I did this through my project's npx knex-migrate up, and I'm not sure whether the UI allows you to do this. If the UI doesn't allow, you can also connect to the database externally to create a new table without a pkey)

  4. Click on the table in the Railway Database Data Viewer

  5. Click on a row.

Expected: I can see the data (or at least a popup error).

Actual: The entire site crashes and says "Application Error: a client-side exception has occurred..."

The console error indicates that this is the case.

Error: No PRIMARY KEY. Please set one in order to be able to edit/delete.
NextJS 11

Solved

4 Replies

brody
EMPLOYEE

a year ago

Thank you for the report, I have ticketed this and will let you know when fixed!


brody
EMPLOYEE

a year ago

Hello!

This has been fixed, can you let me know if you can reproduce it or reproduce a similar issue?


ae-hopscotch
HOBBYOP

a year ago

This appears to be fixed, thank you! steam_locomotive emoji


brody
EMPLOYEE

a year ago

Awsome!


Status changed to Solved brody over 1 year ago


Loading...