user
09/09/2021, 11:33 AMklara
so it would match a value Klára
as well? Essentially making modified characters equal (á
~ a
Deleted User
09/09/2021, 11:45 AMScott Prins
09/09/2021, 1:48 PMsilentworks
09/09/2021, 2:09 PMstefanjensen
09/09/2021, 2:11 PMScott Prins
09/09/2021, 2:15 PMsilentworks
09/09/2021, 3:15 PMstefanjensen
09/09/2021, 3:20 PMVolkan
09/09/2021, 4:35 PMVolkan
09/09/2021, 4:35 PMsql
CREATE POLICY "policy_name"
ON public.Todo
FOR INSERT WITH CHECK (
auth.role() = 'authenticated'
);
Volkan
09/09/2021, 4:36 PMall
it works fineVolkan
09/09/2021, 4:36 PMVolkan
09/09/2021, 4:37 PMSECURITY DEFINER;
but this basic thing just doesn't work 🤔Volkan
09/09/2021, 4:38 PMVolkan
09/09/2021, 4:49 PMwaptik
09/09/2021, 5:09 PMSHλKESPEλR ♂
09/09/2021, 5:17 PMdrex
09/09/2021, 6:41 PMwaptik
09/09/2021, 7:17 PMdrex
09/09/2021, 7:25 PMjon
09/09/2021, 9:50 PMthere is no unique or exclusion constraint matching the ON CONFLICT specification
here's the code:
const { data: organization, error } = await supabase.from<definitions['organizations']>('organizations').upsert(
{
...
},
{
onConflict: 'angelList',
},
);
I saw when creating the table in the UI I had the option to make columns unique. but now that it's created, it's not an option in the UI. I ran this in the sql console, but still not working:
ALTER TABLE organizations
ADD CONSTRAINT organizations_unique UNIQUE ("angelList", "crunchbase", "domain", "linkedin");
any help here?jason-lynx
09/10/2021, 2:21 AMangelList
, then you also need a unique constraint on just that column (i think)jason-lynx
09/10/2021, 2:24 AMangelList
(only ensures a unique combination of those 4 columns you specified). that seems like what the error message is sayingProdigy7kX
09/10/2021, 2:43 AMProdigy7kX
09/10/2021, 2:45 AMProdigy7kX
09/10/2021, 2:46 AMProdigy7kX
09/10/2021, 2:46 AMRichCorbs
09/10/2021, 3:25 AMlocal_team1:teams!team1(*),local_team2:teams!team2(*)
The "local" strings alias the results.
The "!team1/!team2" strings tell which foreign key/relationship to use in the query.Prodigy7kX
09/10/2021, 3:27 AMProdigy7kX
09/10/2021, 3:28 AM