Marcel
DTDrizzle Team
•Created by Marcel on 10/25/2024 in #help
How to declare optional one-to-one relationship
I have 2 tables that relate to each other in an inverse manner:
If I go ahead and create a user without a profile in Studio, no error is shown. However, when I run the following script during runtime, unexpected errors may appear.
I understand that I could fix this by updating my schema relationships and linking a profile ID in the users table but, given that I have many tables that relate to individual users where table information may or may not exist (e.g. profile, KYC data, KYB data, etc.), I thought this would be the best way to design it.
2 replies
DTDrizzle Team
•Created by Marcel on 8/17/2024 in #help
[Turso] Undefined primaryKey on push
How can I migrate a schema using Turso (libsql)? When I run
drizzle-kit push
, I get this error: Cannot read properties of undefined (reading 'primaryKey')
I have also tried to introspect and generate the new SQL script, but I get this error: LibsqlError: SQL_NO_STATEMENT: SQL string does not contain any statement
. Is there a way to fix this? Not sure what I should do as a first-time drizzle user3 replies