TablePlus-Windows
TablePlus-Windows copied to clipboard
Add GUI functionality for UNIQUE constraint
-
Which driver are you using and version of it (Ex: PostgreSQL 10.0): PostgreSQL 12.1
-
Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81): 112
Feature request: Add GUI functionality for UNIQUE constraint. According to PostgreSQL, UNIQUE constraints and UNIQUE indexes are not fully identical. So it would be great to implement UNIQUE constraints in the interface, so we don't have to write separate SQL statements to get them.
This is possibly related to this.
Just want to add our support for this feature request =)
at least can you add a warning that this feature is not working as user expects
It clearly show that only the table structure and content and no other items, such as indices, triggers, events... You should use the backup/restore feature for fully compatible @madbbb However, I agree that we should also add a big note that the user should not use it as a backup database solution or better remove this feature.
@huyphams Then why primary key is exported?
Database has hundred of thousand features, and TablePlus supports more than 10 database types. Implement all of those features (triggers, events, indices, function, procedures..... and many more) are impossible. Primary key is just one of them, so even we tried to implement backup indices (which is extremely complex), we will still receive emails or issues report that some feature xxx that is not included in the exported file and break their databases... So the best solution is using the backup/restore features (which is using the original database binaries) for fully compatibility.
I take a closer look and seems like it takes first index from the table, no matter what type it is - PK, UNIQUE or index.
I'm sorry if my comment looks harsh, totally agree with you that it is hard to support everything. I just want to say in my defence that is not that obvious that the feature is not exporting indexes. I'm a paid user and you have the best database client app.
We have a small note for multiple tables export but It is missed when we export single table. We've added it for both macOS and Windows version. I'm sorry for your issue.