P
Prisma2mo ago
Jay

prisma migrate dev deleted all my data and when I do another migrate dev again I got shadow error

This always happened
4 Replies
Jay
Jay2mo ago
typescript

Error: P3006

Migration `20240613195319_delete_all` failed to apply cleanly to the shadow database.
Error:
ERROR: function uuid_generate_v4() 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
typescript

Error: P3006

Migration `20240613195319_delete_all` failed to apply cleanly to the shadow database.
Error:
ERROR: function uuid_generate_v4() 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
Nurul
Nurul2mo ago
Hey @Jay 👋 I assume you have referenced uuid_generate_v4() in your schema.prisma file somewhere, correct? Is this function available in your database? It looks like this error occurs because the function is not available to your database.
Jay
Jay2mo ago
no its not there
Nurul
Nurul2mo ago
Do you mean the function is not available in the database or you haven't referenced uuid_generate_v4() in your schema.prisma file?