Meexa
Explore posts from serversDTDrizzle Team
•Created by Meexa on 8/24/2024 in #help
Providing optional columns to insert query results in type error
12 replies
DTDrizzle Team
•Created by Meexa on 2/28/2024 in #help
What should the driver be in drizzle.config.ts when using bun sqlite?
I get an error when I leave out
driver
in my drizzle config
I tried better-sqlite but then it asks me to install better-sqlite31 replies
DTDrizzle Team
•Created by Meexa on 1/9/2024 in #help
Error: Cannot open database because the directory does not exist
This is my config (in root)
My client file (
/src/db/index.ts
)
sqlite.db
is in the root of my project4 replies
DTDrizzle Team
•Created by Meexa on 12/7/2023 in #help
How to do "onConflictDoUpdate" when inserting an array of values?
I want to add multiple rows to my table but it has a unique key, so it has to update the row if there is a conflict. How do I do this with the ORM?
16 replies
DTDrizzle Team
•Created by Meexa on 11/21/2023 in #help
sqlite insert results in error: "SQLite error: no such table: main.__old_push_items"
2 of my 3 table insert work fine, but my
auctions
table inserts do not work for some reason. When I try to insert data into my sqlite db on Turso I get the following error:
Versions
Insert code uses Zod to validate, which it passes succesfully
I also tried raw sql insert but it gives the same error
7 replies
DTDrizzle Team
•Created by Meexa on 8/18/2023 in #help
Update column A with the value of column B
I want to update column B with an updated value of column A
So, something like this
Obviously doesn't work this way, but what would be the way to do it in Drizzle?
6 replies
DTDrizzle Team
•Created by Meexa on 8/16/2023 in #help
SQL_PARSE_ERROR: SQL string could not be parsed: near LP, "None"
Full error:
I'm getting this error with this query. Is the query correct? Trying to get a list of characters that are not in the DB yet from a list of IDs
schema
8 replies
DTDrizzle Team
•Created by Meexa on 8/15/2023 in #help
Drizzle can't find local sqlite file
I'm trying to play around with sqlite but I can't seem to connect my config and local sqlite db file.
Config:
The sqlite db file is in the root of my project, just like the drizzle config
I've also set up this file in
src/db/index.ts
Error:
5 replies
DTDrizzle Team
•Created by Meexa on 4/17/2023 in #help
How do I get the values of an insert inside a transaction?
I have this transaction where I create a project and add variables and a history of those variables. I need the IDs of the variables for
variables_history
. How can I get those values?
12 replies
DTDrizzle Team
•Created by Meexa on 4/12/2023 in #help
How do I connect to sqlite on fly.io?
I followed the instructions on fly.io on how to setup a project using sqlite. I believe I did it all correctly. I've created a volume and an app and I've linked the volume to the app. Now I don't know how to connect to the sqlite db on there. On local I simply do
new Database('sqlite.db')
but I don't know what to use on fly.io. There are no docs on fly.io about this either, and I already asked on their forums.
Has anyone done this before? 🙂15 replies
DTDrizzle Team
•Created by Meexa on 4/6/2023 in #help
"The supplied SQL string contains more than one statement" after running "generate:sqlite"
I just updated one of my schemas with a few columns and now my project is broken.
This is the generated SQL
5 replies
DTDrizzle Team
•Created by Meexa on 3/30/2023 in #help
SQLite migrations are not being applied
First time using SQLite and drizzleORM, so forgive me if this is a stupid question. I've been trying to set this up for an hour now.
I have installed drizzleORM and drizzle-kit, I've added the setup from the docs and I have ran my first migration with
drizzle-kit generate:sqlite
. I have a db file in my root and folder with the migration that creates a users
table.
I get an error when I try query the users
table, saying it does not exist.30 replies