Furki4_4
Furki4_4
Explore posts from servers
DTDrizzle Team
Created by joshborseth on 9/14/2023 in #help
TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')
my column names are not too long, but still having the same issue. I can't even push the same migration after regenerating them from scratch. I tried giving custom names to composite keys but didn't work as well. kit version: 0.22.2 orm version: 0.31.1
44 replies
DTDrizzle Team
Created by jakeleventhal on 1/8/2024 in #help
How to run drizzle-kit studio out of docker?
alright, thank you for responding :HYPERSL: if possible, can you please tag someone who may help us?
13 replies
DTDrizzle Team
Created by jakeleventhal on 1/8/2024 in #help
How to run drizzle-kit studio out of docker?
@Angelelz may you help us?
13 replies
DTDrizzle Team
Created by jakeleventhal on 1/8/2024 in #help
How to run drizzle-kit studio out of docker?
No description
13 replies
DTDrizzle Team
Created by jakeleventhal on 1/8/2024 in #help
How to run drizzle-kit studio out of docker?
Hi @jakeleventhal I'm having a similar problem, have you found a solution? I'm running a node container for Next.js application and a postgres server. Since I boot drizzle studio inside the web container, I thought porting 4983:4983 would solve it but didn't work.
version: "3.8"
services:
web:
build: .
volumes:
- .:/app
- /app/node_modules
links:
- db
environment:
- DATABASE_URL=postgresql://postgres:furkicik@db:5432/turkish_dictionary
ports:
- "3000:3000"
- "4983:4983"
db:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=furkicik
- POSTGRES_DB=turkish_dictionary
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data

volumes:
db-data:
version: "3.8"
services:
web:
build: .
volumes:
- .:/app
- /app/node_modules
links:
- db
environment:
- DATABASE_URL=postgresql://postgres:furkicik@db:5432/turkish_dictionary
ports:
- "3000:3000"
- "4983:4983"
db:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=furkicik
- POSTGRES_DB=turkish_dictionary
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data

volumes:
db-data:
13 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 12/30/2023 in #questions
QueryClient type error using create-t3-app
the problem was in the package-lock.json and npm i did the trick. https://github.com/TanStack/query/issues/6432#issuecomment-1826274630
4 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 12/30/2023 in #questions
QueryClient type error using create-t3-app
4 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 11/24/2023 in #questions
next-auth drizzle adapter customization
hey dude@skuse did my code do the trick for you ?
7 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 11/24/2023 in #questions
next-auth drizzle adapter customization
7 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 11/24/2023 in #questions
next-auth drizzle adapter customization
7 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 11/26/2023 in #questions
can't find meta/_journal.json file on prod | DRIZZLE
calling this async migrate function in the migrateToLatest seems solved the issue. BUT IDK WHY
export const migrateToLatest = async () => {
await migrate(db, { migrationsFolder: "drizzle/migrations" });
};
export const migrateToLatest = async () => {
await migrate(db, { migrationsFolder: "drizzle/migrations" });
};
3 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 11/24/2023 in #questions
next-auth drizzle adapter customization
I solved it creating my own adapter instead of changing the source code. The username gets what I expected above.
7 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 11/23/2023 in #questions
how to create relatedWords relation for each words using drizzle. | DRIZZLE | SQL |
btw, thank you for your time and answer creepyheart
9 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 11/23/2023 in #questions
how to create relatedWords relation for each words using drizzle. | DRIZZLE | SQL |
one second thought, what if I just put the related words as an array of strings or without any relationship ? is it too bad idea creepysweat
9 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 11/23/2023 in #questions
how to create relatedWords relation for each words using drizzle. | DRIZZLE | SQL |
a word can have multiple related words, like it can be 2, 3, 10 or more. i guess word1Id and word2Id wouldn't work in this cases.
9 replies
TTCTheo's Typesafe Cult
Created by Furki4_4 on 11/23/2023 in #questions
how to create relatedWords relation for each words using drizzle. | DRIZZLE | SQL |
export const wordsToRelatedWordsRelations = relations(
wordsToRelatedWords,
({ one }) => ({
words: one(words, {
fields: [wordsToRelatedWords.wordId],
references: [words.id],
}),
relatedWords: one(relatedWords, { // should be related words
fields: [wordsToRelatedWords.relatedWordId],
references: [relatedWords.relatedWordId], // changed as you did
}),
})
);
export const wordsToRelatedWordsRelations = relations(
wordsToRelatedWords,
({ one }) => ({
words: one(words, {
fields: [wordsToRelatedWords.wordId],
references: [words.id],
}),
relatedWords: one(relatedWords, { // should be related words
fields: [wordsToRelatedWords.relatedWordId],
references: [relatedWords.relatedWordId], // changed as you did
}),
})
);
I made this changes but it's still throwing the same error
9 replies
TTCTheo's Typesafe Cult
Created by Trader Launchpad on 10/31/2023 in #questions
[Nextauth] How to use middleware with grouped routes?
hmm monkaHmm you can call getServerSession function to get the session in the server side and guard your pages under this layout by redirecting based on session. I guess this might work because when you go to a page that's grouped under (admin) folder, the layout.tsx will be triggered and you can manage the redirection here. I don't know if you can handle route guard using route groups because they don't have any effect on URL. So, you might not be able to set a matcher. May I ask why you don't use /admin/:path ? You can use layout file in admin folder if that's what you need.
8 replies
TTCTheo's Typesafe Cult
Created by Trader Launchpad on 10/31/2023 in #questions
[Nextauth] How to use middleware with grouped routes?
see the green TIP part, I believe that's what you want
8 replies
TTCTheo's Typesafe Cult
Created by Trader Launchpad on 10/31/2023 in #questions
[Nextauth] How to use middleware with grouped routes?
8 replies
TTCTheo's Typesafe Cult
Created by alan on 10/15/2023 in #questions
how to get conditional tailwind classes to work
8 replies