addamsson
addamsson
Explore posts from servers
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
once the performance becomes a huge issue I'll migrate to kysely. it was super fast to set up, generated the schema from my prisma file without issues and worked like a charm out of the box
35 replies
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
ill keep using prisma for the time being
35 replies
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
FYI I ended up not migrating to Drizzle after facing numerous problems and drawbacks
35 replies
DTDrizzle Team
Created by addamsson on 6/10/2024 in #help
Drizzle complains when I'm trying to insert into a table.
i ended up not migrating my project to drizzle though as the were too many problems with it
5 replies
DTDrizzle Team
Created by addamsson on 6/10/2024 in #help
Drizzle complains when I'm trying to insert into a table.
thanks
5 replies
DTDrizzle Team
Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
kinda makes the query api useless
18 replies
DTDrizzle Team
Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
also no nested queries so i cant even do a n:m query with the query api
18 replies
DTDrizzle Team
Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
there are plenty as I've discovered in the last few days when I tried to migrate my prisma project 😅
18 replies
DTDrizzle Team
Created by addamsson on 6/10/2024 in #help
Is it possible to use the Query API to select many-to-many relations?
and value of result was:
[
{
id: '97426d60-3864-49f5-95a8-426829a42cc6',
name: 'hey',
roles: [ 'User' ],
teams: {
teamId: 'b651be48-50b2-4fb2-946e-a961029679c2',
orgId: '02a114d0-326d-48f8-9293-1ca930bebfc1',
name: 'team 0'
}
},
{
id: '97426d60-3864-49f5-95a8-426829a42cc6',
name: 'hey',
roles: [ 'User' ],
teams: {
teamId: 'ec0b8126-cabc-43d9-a63d-2ace43554aba',
orgId: '02a114d0-326d-48f8-9293-1ca930bebfc1',
name: 'team 01'
}
}
]
[
{
id: '97426d60-3864-49f5-95a8-426829a42cc6',
name: 'hey',
roles: [ 'User' ],
teams: {
teamId: 'b651be48-50b2-4fb2-946e-a961029679c2',
orgId: '02a114d0-326d-48f8-9293-1ca930bebfc1',
name: 'team 0'
}
},
{
id: '97426d60-3864-49f5-95a8-426829a42cc6',
name: 'hey',
roles: [ 'User' ],
teams: {
teamId: 'ec0b8126-cabc-43d9-a63d-2ace43554aba',
orgId: '02a114d0-326d-48f8-9293-1ca930bebfc1',
name: 'team 01'
}
}
]
3 replies
DTDrizzle Team
Created by addamsson on 6/10/2024 in #help
Is it possible to use the Query API to select many-to-many relations?
I tried to do the same with a select and it doesn't seem to group the results:
const result = await db
.select({
id: User.id,
email: User.email,
name: User.name,
roles: User.roles,
teams: {
teamId: Team.id,
orgId: Team.orgId,
name: Team.name,
},
})
.from(User)
.leftJoin(UserToTeam, eq(UserToTeam.userId, User.id))
.leftJoin(Team, eq(UserToTeam.teamId, Team.id))
.where(eq(User.id, userId));
const result = await db
.select({
id: User.id,
email: User.email,
name: User.name,
roles: User.roles,
teams: {
teamId: Team.id,
orgId: Team.orgId,
name: Team.name,
},
})
.from(User)
.leftJoin(UserToTeam, eq(UserToTeam.userId, User.id))
.leftJoin(Team, eq(UserToTeam.teamId, Team.id))
.where(eq(User.id, userId));
3 replies
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
ping?
35 replies
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
which leads to failures
35 replies
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
when i generate a migration from my current db schema it hardcodes public into all enum declarations
35 replies
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
is there a fix for the schemaless enum problem?
35 replies
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
interestingly enough if i just copy the sql into dbeaver it executes without an error
35 replies
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
there is a relevant issue on GitHub too
35 replies
DTDrizzle Team
Created by addamsson on 6/4/2024 in #help
How can I "tell" Drizzle if a migration is considered "done" or not when migrating from Prisma?
oh.
35 replies
DTDrizzle Team
Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
The problem is that there can be changes in a migration that can't be undone (custom queries and stuff like that) automatically
18 replies
DTDrizzle Team
Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
18 replies
DTDrizzle Team
Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
this is what I mean by up and down: https://kysely.dev/docs/migrations
18 replies