✦ xcaeser
✦ xcaeser
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
great, and for this
regions: defineTable({
name: v.string(),
countryId: v.id("countries"),
}),

cities: defineTable({
name: v.string(),
regionId: v.id("regions"),
areaId: v.id("areas"),
}),
regions: defineTable({
name: v.string(),
countryId: v.id("countries"),
}),

cities: defineTable({
name: v.string(),
regionId: v.id("regions"),
areaId: v.id("areas"),
}),
that's all i need? or do i add in regions cities: v.id or v.array?
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
nah, just need roles, and oauth
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
should i use convex-auth?
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
export const dealRelations = relations(deals, ({ one, many }) => ({
users: many(dealUsers),
announcements: many(announcements),
creator: one(users, {
fields: [deals.createdByUserId],
references: [users.id],
}),
companies: many(dealCompanies),
streams: many(vdrStreams),
})
)
export const dealRelations = relations(deals, ({ one, many }) => ({
users: many(dealUsers),
announcements: many(announcements),
creator: one(users, {
fields: [deals.createdByUserId],
references: [users.id],
}),
companies: many(dealCompanies),
streams: many(vdrStreams),
})
)
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
let me show u gotta open another old repo
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
i like how drizzle relations does it
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
haha, and many to many, one to many? is just v.id("table") correct?
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
i like how opinionated convex is so far
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
oh undefined i see
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
what if i do v.optional(v.bool
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
@erquhart
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
last question i think lol, how about default values? promoted Boolean @default(false) is it promoted: v.boolean() || false,
24 replies
CCConvex Community
Created by ✦ xcaeser on 9/26/2024 in #general
thank you!! im migrating from prisma, i
you're awesome thank you
24 replies