TablePlus-Windows icon indicating copy to clipboard operation
TablePlus-Windows copied to clipboard

Add GUI functionality for UNIQUE constraint

Open libcub opened this issue 4 years ago • 9 comments

  1. Which driver are you using and version of it (Ex: PostgreSQL 10.0): PostgreSQL 12.1

  2. 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.

libcub avatar Jan 06 '20 11:01 libcub

This is possibly related to this.

libcub avatar Jan 06 '20 11:01 libcub

Just want to add our support for this feature request =)

unlostify avatar Jun 04 '20 18:06 unlostify

at least can you add a warning that this feature is not working as user expects

madbbb avatar Sep 03 '21 06:09 madbbb

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 avatar Sep 03 '21 07:09 huyphams

@huyphams Then why primary key is exported?

madbbb avatar Sep 03 '21 07:09 madbbb

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.

huyphams avatar Sep 03 '21 07:09 huyphams

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.

madbbb avatar Sep 03 '21 07:09 madbbb

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.

madbbb avatar Sep 03 '21 07:09 madbbb

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. Screen Shot 2021-09-03 at 2 19 58 PM

huyphams avatar Sep 03 '21 07:09 huyphams