Skip to content

Conversation

Ujjansh05
Copy link
Contributor

@Ujjansh05 Ujjansh05 commented Oct 2, 2025

Prevent Duplicate Table Names on Table Creation

Description

This PR updates the table creation logic in DiagramContext.jsx to ensure that each new table is assigned a unique name. Previously, adding multiple tables could result in duplicate names (e.g., table_6), causing confusion and issues in the diagram.

Changes

  • The addTable function now checks existing table names and automatically assigns a unique name by incrementing the suffix (e.g., table_6, table_7, etc.).
  • This prevents duplicate table names and improves usability.

How to Test

  1. Add multiple tables using the editor.
  2. Verify that each new table receives a unique name.
  3. Confirm that no duplicate table names are created.

Related Issues

  • Fixes bug where duplicate table names were allowed (see attached screenshot in the issue report).

Additional Notes

No breaking changes. This improves user experience and prevents naming conflicts in the diagram.

Bug check

[BUG] #599

Copy link

vercel bot commented Oct 2, 2025

@Ujjansh05 is attempting to deploy a commit to the dottle's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Ujjansh05 Ujjansh05 changed the title Update DiagramContext.jsx Prevent Duplicate Table Names When Creating Tables (Update DiagramContext.jsx) Oct 2, 2025
Copy link

vercel bot commented Oct 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
drawdb Ready Ready Preview Comment Oct 2, 2025 5:14pm

@1ilit
Copy link
Member

1ilit commented Oct 2, 2025

Thank you!

@1ilit 1ilit merged commit 1732e76 into drawdb-io:main Oct 2, 2025
3 checks passed
ewqazxc pushed a commit to ewqazxc/drawdb that referenced this pull request Oct 7, 2025
…text.jsx) (drawdb-io#600)

* Update DiagramContext.jsx

* Update DiagramContext.jsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants