drawdb-io / drawdb

Free, simple, and intuitive online database diagram editor and SQL generator.
https://drawdb.app
GNU Affero General Public License v3.0
22.7k stars 1.58k forks source link

[BUG]表连接发生错乱 #298

Open zhongweijian-svg opened 1 week ago

zhongweijian-svg commented 1 week ago

不知道为什么,好像是,当我删除一个表,还是调删除键值的时候,外键表连接发生部分错乱!我不知道发生了什么?I don't know why, it seems, when I delete a table, or delete the key value, the foreign key table connection is partially disturbed! I don't know what happened. Screenshot 2024-11-13 124313 Screenshot 2024-11-13 124248 Screenshot 2024-11-13 124228Here is the original connection method。 product_img_lists,p_id--product_lists,p_id. and Chaotic connection article_lists,a_title,product_lists,p_id.

zhongweijian-svg commented 1 week ago

Screenshot 2024-11-13 124313 Screenshot 2024-11-13 124248 It might help you see more clearly.如果撤销时,不要将表的位置信息记录,那就好了。It would be nice if, when undone, the table's location information was not recorded.

1ilit commented 1 week ago

can you please give me step by step instructions on how to to reproduce this bahavior?

zhongweijian-svg commented 1 week ago

Delete a table, then undo, you will find a complete mess!! Screenshot 2024-11-13 151603 Screenshot 2024-11-13 151630

zhongweijian-svg commented 1 week ago

i delete the table product_detail_lists,i can't really recover,Please improve the undo function

zhongweijian-svg commented 1 week ago

Screenshot 2024-11-13 153056 这也导致了额外的重复声明引用问题和其它表的关系映射错误,仅仅因为我误删表格,在不完善的撤销程序下导致我无法正确撤销,需要额外工作量。This also led to additional duplicate declaration reference issues and relationship mapping errors for other tables, just because I deleted the table by mistake, I could not undo it properly under the imperfect undo procedure,and required additional work

1ilit commented 5 days ago

@zhongweijian-svg simple undo redo works just fine. it's probably some edge case that i'm missing

https://github.com/user-attachments/assets/873c6c11-59b1-4a20-bc08-7ba8f404af81

can you share a diagram and tell me which table to delete to track down the bug