Baorong Huang
04/29/2023, 2:58 AMphotos
which has a column called photo
that is the path in my bucket called photos-bucket
.
I created a trigger that will be executed after DELETE on the photos
table, the privilege is set to invoker.
The problem is that it returns me an error 'column "bucket_id" does not exist'
sql
CREATE OR REPLACE FUNCTION public.delete_photo_in_bucket()
RETURNS trigger
LANGUAGE plpgsql
AS $function$
begin
DELETE FROM storage.buckets
WHERE bucket_id = 'hao-duo-zhao-pian' AND name = OLD.photo;
RETURN OLD;
end;
$function$
https://cdn.discordapp.com/attachments/1101704023293304962/1101704023482060840/image.png▾
mtin79
04/29/2023, 8:05 AMsilentworks
04/30/2023, 2:02 AMgetSession
so I can take a look please?imousart
04/29/2023, 10:33 AM!Stan_---__-
04/29/2023, 10:42 AMMerovingian
04/29/2023, 10:47 AMexport default {
prefixes: ['myapp://'],
config: {
screens: {
AuthStack: {
screens: {
Login: 'login',
Register: 'register',
ForgotPassword: 'forgot-password',
UpdatePassword: 'update-password',
},
},
},
},
};
then i am trying to see uri-scheme is okay?
And I am running this command on terminal:
npx uri-scheme open "myapp://forgot-password" --ios
npx uri-scheme open "myapp://forgot-password" --android
npx uri-scheme open "myapp://update-password" --ios
npx uri-scheme open "myapp://update-password" --android
yes, I can navigate in that screens when i call these commands.
There is the problem: When i trying to use after initialized. I am writing my email on my forgot password screen. Then i push the button. It showes me an alert which is related success.
Then I go to the mail, I can see like that URL:
projectURL.supabase.co/auth/v1/verify?token={token}&type=recovery&redirect_to=myapp://update-password
Here it comes:
When i push that button, Safari says, Do you want to open "myapp" , after click yes button, every time showes me login screen. I can't handle it. It makes me feel fool. Please help me. This is my forgot-password & update password codes.
I also write my url configurations on supabase . You can look comments for codes.O.Little
04/29/2023, 11:16 AM(requesting_user_id() = ANY(user_ids))
I get an error that the insert request violates RLS policy.
Whats the correct way to write this policy?cuca
04/29/2023, 12:01 PMhttps://cdn.discordapp.com/attachments/1101840666100772945/1101840909961789510/Screenshot_2023-04-29_at_13.02.04.png▾
SunTzu
04/29/2023, 12:22 PMcode
:
"42883"
details
:
null
hint
:
"No operator matches the given name and argument types. You might need to add explicit type casts."
message
:
"operator does not exist: jsonb ~~ unknown"
Im receiving the above error when I try to do what I think is a simple query?
``const checkDocs = await supabase
.from("embeddings_tensorflow")
.select("*")
.like("metadata", { id: "doc20" });``VuNguyen
04/29/2023, 12:40 PMhttps://cdn.discordapp.com/attachments/1101850580164558958/1101850580462338079/image.png▾
Kyle Parkin
04/29/2023, 1:48 PMven
04/29/2023, 2:09 PMhttps://cdn.discordapp.com/attachments/1101872915391189072/1101872915626074132/not_able_to_send_password_recovery_email.png▾
heedongcho-xyz
04/29/2023, 3:27 PMCryPax
04/29/2023, 3:34 PMpetoma
04/29/2023, 3:39 PMlet query = supabase
.from("asignaturas")
.select(`*,
curso: cursos!inner ( id ),
grupos_especialidades!inner ( id )
`)
.eq("curso.id", 5)
.eq("grupos_especialidades.id", 1);
const { data, error } = await query;
return { data, error };
I shouldn't receive any output because with the course_id: 5 and group_id: 1 there is no row that has both conditions. However I am obtaining the asignatura_id: 7 that you see in the screenshot.
What am I doing wrong?
https://cdn.discordapp.com/attachments/1101895613228003461/1101895613408350218/Captura_de_pantalla_2023-04-29_a_las_17.31.42.png▾
salzar
04/29/2023, 3:54 PMtus: unexpected response while creating upload, originated from request (method: POST, url: https://wmsccjgcrykictvgimtt.supabase.co/storage/v1/upload/resumable, response code: 403, response text: new row violates row-level security policy, request id: n/a)
Epailes
04/29/2023, 4:44 PMuser-client
(supabase-js client using users jwt), and also create another admin-client
(supabase-js client using the service role), is there any issues of the user-client
potentially having admin rights on requests it generates? Or admin-client
performing requests scoped to the users access?
I don't think this can happen, but it's bugging me I can't find that github thread so would appreciate someone confirming here 🙂Rabeeh
04/29/2023, 5:28 PMdeathless
04/29/2023, 5:34 PMSunTzu
04/29/2023, 6:19 PMnateland
04/29/2023, 7:48 PMupdateUser: async (
email: string,
name: string,
lastName: string,
newEmail?: string
) => {
const { data, error } = await supabase
.from("user")
.update({
name: name,
last_name: lastName,
newEmail: newEmail ? newEmail : email,
})
.eq("email", email);
if (error) {
console.log("error", error);
return error;
}
return data;
},
however, there are other tables that havea a foreign key on the email. So, how can I cascade the change to the other tables?Entropy
04/29/2023, 9:13 PM5h1rU
04/29/2023, 10:22 PMSQL
create view
public.organization_membership as
select
o.id,
o.name,
o.created_at,
m.access
from
organizations o
join memberships m on o.id = m.organization_id;
The problem is that if I use it as it is, I can access to the data without any restriction.
While I was searching for a solution, I came across an answer on stackoverflow that seems to work.
Link: https://stackoverflow.com/questions/33858030/why-isnt-row-level-security-enabled-for-postgres-views
The line added was.
SQL
ALTER VIEW view_name SET (security_invoker = on);
I'm a bit uncertain about whether it's a good idea to apply that flag, and even if it is, the UI doesn't seem to make it clear that using it will actually alter the view. Additionally, even after running it from the SQL console, there is no indication about any change. It's all a bit confusing to me.3IMAD
04/29/2023, 10:53 PMconst user_id = "ee111686-d4a9-4263-9735-445b60d53c8d"
supabase.channel('MyList')
.on(
'postgres_changes',
{ event: '*', schema: 'public', table: 'MyList',filter: `user_id=eq.${user_id}` },
(payload) => {
console.log('Change received!', payload)
}
)
.subscribe()
3IMAD
04/29/2023, 11:06 PMhttps://cdn.discordapp.com/attachments/1102007911263256607/1102007911921745950/image.png▾
https://cdn.discordapp.com/attachments/1102007911263256607/1102007912227946676/image.png▾
Mondmann
04/29/2023, 11:16 PMzach
04/29/2023, 11:33 PMhttps://cdn.discordapp.com/attachments/1102014750503739484/1102014750994477096/Screenshot_2023-04-29_at_7.29.13_PM.png▾
https://cdn.discordapp.com/attachments/1102014750503739484/1102014751296458842/Screenshot_2023-04-29_at_7.28.39_PM.png▾
https://cdn.discordapp.com/attachments/1102014750503739484/1102014751602647130/Screenshot_2023-04-29_at_7.28.19_PM.png▾
https://cdn.discordapp.com/attachments/1102014750503739484/1102014751917215755/Screenshot_2023-04-29_at_7.28.07_PM.png▾
https://cdn.discordapp.com/attachments/1102014750503739484/1102014752395370666/Screenshot_2023-04-29_at_7.24.49_PM.png▾
Hugos
04/29/2023, 11:50 PMdave
04/30/2023, 1:16 AMses:no-track
tag to the email templates, but it disappears as soon as I click save. e.g. if I enter this:
html
<p><a ses:no-track href="{{ .ConfirmationURL }}">Log In</a></p>
It still saves as:
html
<p><a href="{{ .ConfirmationURL }}">Log In</a></p>
Any ideas on how I can add invalid HTML and save it?neosavvy
04/30/2023, 1:22 AM