ToolJet / ToolJet/ToolJet

TJDB: Unable to change the composite primary key

Open
#12,406 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug database
Dominant language
JavaScript
Stars
40.9k
Forks
5.4k
Avg merge
2d 18h
Merged PRs (30d)
202

Description

Version Information

Version 3.7.0-ce

What is the expected behaviour?

Composite primary keys should be replaced with other composite and primary keys

What is the current behaviour?

Unable to change the existing composite primary key with other composite and primary keys

How to reproduce the issue?
  1. Login with valid credentials
  2. Navigate to the database page
  3. Create a table with a single primary key (example: id)
  4. Edit table and make campsite primary key (Example: id, column1)
  5. Edit table and change the composite primary key (Example: id, column2) or move back to single primary key (example: id)
Screenshots or Screencast

https://jam.dev/c/b556555a-c2cf-4333-934a-c0e2fcb0e84c

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior in the database page using the listed steps: create a single primary key, add a second column to make it composite, then replace or remove that column. Trace the table-editing flow responsible for changing primary keys and verify that both composite-to-composite and composite-to-single changes complete successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.