Issue with Failed Migration Due to Incompatible Type Between UUID and Text #33003
Unanswered
RubenRivasWP
asked this question in
Questions
Replies: 1 comment
-
|
Have this same issue which is blocking my google auth from working properly. I don't have a fix but I thought I would comment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am experiencing an issue with a migration in PostgreSQL using Supabase. The migration failed due to an invalid operation between uuid and text. The migration attempts to execute the following SQL:
-- previous backfill migration left last_sign_in_at to be null, which broke some projects
do $$
begin
update auth.identities
set last_sign_in_at = '2022-11-25'
where
last_sign_in_at is null and
created_at = '2022-11-25' and
updated_at = '2022-11-25' and
provider = 'email' and
id = user_id::text;
end $$;
The error I receive is as follows:
ERROR: operator does not exist: uuid = text (SQLSTATE 42883)
The id and user_id types are defined as uuid, but the conversion to text in the PL/pgSQL block is causing this issue.
Can anyone help me resolve this problem? Thank you in advance for your support.
Beta Was this translation helpful? Give feedback.
All reactions