UNIQUE constraint on columns
Is your feature request related to a problem? Please describe.
I can't specify that a column's values need to be unique. If Tables is to be considered anything like a database, then this would be essential.
Describe the solution you'd like
Just like there's a "required" switch on the column creation dialog (NOT NULL), a "unique" switch should be there too. Row creation should fail if the value is not unique.
Describe alternatives you've considered
No response
Additional context
No response
Do you have a special use case in mind?
We don't want to cover all features a db would have, so lets talk about use cases to see if this helpful.
My case at hand involves storing some information about correspondents based on their email address. I would like Tables to prevent me from inserting the same address twice.
I'm definitely not suggesting covering all DB features here, but I think a UNIQUE requirement on a field is so utterly common across all kinds of table data, that it doesn't even require much justification other than that.
Also, I think it would definitely not be confusing for users, this is a very clear and obvious principle.
Also (just guessing here) implementing it would be close to trivial: the UI would consist of a single additional switch on the column dialog, and a failure condition on creation/update. Also, since it is a primitive feature of any underlying DB, the back-end part would be trivial to implement too.
Do you have a special use case in mind?
We don't want to cover all features a db would have, so lets talk about use cases to see if this helpful.
I don't think that this crucial feature https://github.com/nextcloud/tables/issues/172 will not work well without the ability to avoid duplicates.
Another Use Case: Master Data Management ( E.g. a Table for all Member of a Team) Or listing unique items like invoices and avoid having the same invoice number twice,
If this is implemented, please be aware that there is a copy-feature that might need some adjustments https://github.com/nextcloud/tables/pull/1713
Furthermore this might affect the import feature.
Just posting this to keep in in mind.