Support setting unique columns on console
See original GitHub issueIf one would like to set up a table in postgresql such that two columns together must be unique it would have to do this in sql:
CREATE TABLE someTable (
id serial primary key,
col1 int NOT NULL,
col2 int NOT NULL,
unique (col1, col2)
)
So, col1 and col2 can repeat, but not at the same time. So, this would be allowed (Not including the id)
1 1
1 2
2 1
2 2
but not this:
1 1
1 2
1 1 -- would reject this insert for violating constraints
Work around
Create table in the sql console, untrack table then track it once created. Caveat : it is not exported in the metadata.json.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Columns marked as Unique in Hub Console allow duplicates
Hub creates Unique constraint and non-unique index for the unique enabled column. The new column is added after the table was loaded with...
Read more >console.table() - Web APIs | MDN
The console.table() method displays tabular data as a table. ... The first column in the table will be labeled (index) .
Read more >support composite primary, and foreign keys and unique ...
As of now: You can set composite primary keys from the console while creating the table You cannot set ... Support setting unique...
Read more >Custom columns in Backup & Recovery Console - N-able
Adding custom columns · Log in to the Console under a SuperUser account · Click Columns > Add column · Assign a unique...
Read more >Column names in each table must be unique ... - Stack Overflow
Column names in each table must be unique. Column name 'StripeRecipientId' in table 'dbo.Foos' is specified more than once. I double-checked and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Sach97 @revskill10 This is being handled in #506. Closing this one.
I think the need is real and Console UI should support this out of the box, though using SQL is not a big deal. Nice to have feature.