dekinaiyo
dekinaiyo
PPrisma
Created by dekinaiyo on 7/2/2024 in #help-and-questions
Migrate dev failing in a project it used to work in. Says issue w/ user defined functions.
Hi there, I'm trying to update my schema, it hasn't been touched in this project for about a year and a half. when i run prisma migrate dev --name add_rbac_tables --create-only i get this error:
Error: P3006

Migration `20220617231725_update_bigint_fields_to_be_numbers` failed to apply cleanly to the shadow database.
Error:
ERROR: function date_in_user_timezone(timestamp without time zone, character varying) does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
0: schema_core::state::DevDiagnostic
at schema-engine/core/src/state.rs:276
Error: P3006

Migration `20220617231725_update_bigint_fields_to_be_numbers` failed to apply cleanly to the shadow database.
Error:
ERROR: function date_in_user_timezone(timestamp without time zone, character varying) does not exist
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
0: schema_core::state::DevDiagnostic
at schema-engine/core/src/state.rs:276
I have checked out the other posts with issues relating to 'failed to apply cleanly to the shadow database' both on github and here in the discord and haven't found anything that has helped me out of this situation. there are 80 migrations in this project, and there are many after the one that is giving trouble right now so i'm very confused why this is happening now. i know for certain that the function that says it does not exist, does exist in the actual database. also, dataloss matters here, i don't want to lose data in this case. any suggestions on how i might proceed? many thanks.
3 replies