File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed
packages/database/supabase Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change 6969 ON CONFLICT (sync_target, sync_function) DO NOTHING
7070 RETURNING id INTO s_id;
7171 IF s_id IS NOT NULL THEN
72- -- totally new_row, I'm on the task
73- -- return last time it was run successfully
74- SELECT max (last_task_start) INTO result FROM public .sync_info
75- WHERE sync_target = s_target
76- AND sync_function = s_function
77- AND status = ' complete' ;
78- RETURN result;
72+ -- totally new_row, no previous success.
73+ RETURN NULL ;
7974 END IF;
8075 -- now we know it pre-existed. Maybe already active.
8176 SELECT id INTO STRICT s_id
Original file line number Diff line number Diff line change @@ -125,13 +125,8 @@ BEGIN
125125 ON CONFLICT (sync_target, sync_function) DO NOTHING
126126 RETURNING id INTO s_id;
127127 IF s_id IS NOT NULL THEN
128- -- totally new_row, I'm on the task
129- -- return last time it was run successfully
130- SELECT max (last_task_start) INTO result FROM public .sync_info
131- WHERE sync_target = s_target
132- AND sync_function = s_function
133- AND status = ' complete' ;
134- RETURN result;
128+ -- totally new_row, no previous success.
129+ RETURN NULL ;
135130 END IF;
136131 -- now we know it pre-existed. Maybe already active.
137132 SELECT id INTO STRICT s_id
You can’t perform that action at this time.
0 commit comments