dbcodeio / public

The Power of Databases, The Convenience of VS Code: All in One Place
30 stars 1 forks source link

How to add/edit relationships? #122

Open HeldvonKosmos opened 3 days ago

HeldvonKosmos commented 3 days ago

I have read the docs and didn't find a way to add realtionships between the tables. The Entity-Relationship diagram only shows what is there and is not editable. That would be no problem, if i would find a tab for adding foreignkeys into the tables directly. But there is no option. This is an essential feature. So please add it. Another request is: can you change the sorting of columns, when alter the table? Because the id is not in the first place and other attribues are not in the right position. Like in the screenshot.Image I would be a loyal customer, because i really like it and would advice other to also use it.

mikeburgh commented 2 days ago

Thanks, I will get editing and adding FK relationships added to the table create/alter window.. few other things I am working on at the moment so it might be a little while before it’s there.

On the column order, when editing a table the existing columns order cannot be changed…. And the order they show in should match the same order you see when you do a select * from the table. If that’s not the case, which database and version are you using ?

When creating a new table, or adding columns you can re order them, but once you apply changes the order gets fixed.

SQL servers management tool lets you re order existing columns (not sure about the others) but to do it I believe it drops and re creates the table… something I am not prepared to do at this stage given the risks