McPizza
McPizza
Explore posts from servers
DTDrizzle Team
Created by McPizza on 9/7/2023 in #help
Relationships: Self one-one & one-many
dont have any examples to hand right now But for you, you'd have a table called "Friendships" two columns: "Source" - "Friend" Relationships on the friendships one to one to users On users Relationships > many "Source" and many "Friend" Also use relationship names on both sides of the relationships Should work fine
9 replies
DTDrizzle Team
Created by McPizza on 9/7/2023 in #help
Relationships: Self one-one & one-many
I ended up going with a separate relationship table
9 replies
DTDrizzle Team
Created by McPizza on 9/8/2023 in #help
Subqueries with INSERT - errors
Never got this to work for me
4 replies
DTDrizzle Team
Created by McPizza on 9/7/2023 in #help
Relationships: Self one-one & one-many
Ended up creating a separate relationship table and doing it through there Appreciate the help @angelelz
9 replies
DTDrizzle Team
Created by McPizza on 9/7/2023 in #help
Relationships: Self one-one & one-many
got further by adding {relationName: 'replies'} to the many type, but now does not have enough info to infer the relation
9 replies
DTDrizzle Team
Created by Gerbuuun on 7/3/2023 in #help
Drizzle-kit database push connection error
You could also have it be dynamic:
dbCredentials: {
connectionString: `mysql://${process.env.DATABASE_USERNAME}:${process.env.DATABASE_PASSWORD}@${process.env.DATABASE_HOST}/${process.env.DATABASE_NAME}?ssl={"rejectUnauthorized":true}`,
},
dbCredentials: {
connectionString: `mysql://${process.env.DATABASE_USERNAME}:${process.env.DATABASE_PASSWORD}@${process.env.DATABASE_HOST}/${process.env.DATABASE_NAME}?ssl={"rejectUnauthorized":true}`,
},
4 replies
DTDrizzle Team
Created by Gerbuuun on 7/3/2023 in #help
Drizzle-kit database push connection error
AFAIK the standard dotenv does not support dynamic values Does it work if you just set the string manually instead of dynamically? You may also need to wrap the whole env in ' ' to ensure characters are escaped correctly
4 replies