Vilian
Explore posts from serversHow to query with async/await
I'm trying to initialise my react context store on mount with data coming from trpc.
I'm using the t3 stack right now, and it's not immediately obvious on how to wait for the data to load before setting it in the store..
I'm using zustand and he is a snippet of my code
12 replies
DTDrizzle Team
•Created by Vilian on 7/28/2024 in #help
Is it possible to create table during runtime?
I'm are trying to create a multi tenant application for my service. However, i'm unable to find relevant information on whether or not creating table during runtime is possible or not.
The goal here would be to simply create new tables for a newly added tenant. The tables always have the same schema. My strategy is to simply suffix the newly created tables with a tenantId string
1 replies
DTDrizzle Team
•Created by Vilian on 5/23/2024 in #help
Migrations not changing on adding notNull
Is it intended behaviour for migrations not to detect and react to the addition of a
.notNull
on some column ?
Currently, my use case is that have a first migration that has created the table, but now the second migraiton (adding the notNull
) doesn't actually create a migration.2 replies
TTCTheo's Typesafe Cult
•Created by Vilian on 8/28/2023 in #questions
Running migrations on startup
First of all, hey there, I hope you are doing well.
My question as a new next js space/ecosystem is revolved around db migrations.
I'm building an app that aims to be easily self-hostable, but currently, I'm unsure what the best approach is when it comes to applying and continuously rolling out new migrations. I would imagine that running some code before server next js server start is what I am looking for.
Currently, my stack uses the default t3 stack, the only difference is that I use drizzle and turborepo.
Any kind of suggestion/recommendation/pointer to a resource is greatly appreciated.
Thank you for your time.
49 replies
DTDrizzle Team
•Created by Vilian on 8/19/2023 in #help
Query builder insert
What is the syntax for creating an insert query with the query builder ?
There are some examples on the website showcasing
select
, but i'm looking for insert
logic, which the query builder under drizzle-orm/sqlite-core
is missing ( seems to only have select on the QueryBuilder
)9 replies