Titan
Explore posts from serversDTDrizzle Team
•Created by Titan on 11/4/2024 in #help
pgTable This overload is deprecated. Use the other method overload instead.
4 replies
DTDrizzle Team
•Created by Titan on 6/28/2024 in #help
Multiple FROM support (word_similarity) fuzzy search
I'm trying to create this SQL:
Here's what I have, but Drizzle doesn't like the
sql${user}
:
Your "id" field references a column "app-user"."id", but the table "app-user" is not part of the query! Did you forget to join it?
1 replies
DTDrizzle Team
•Created by Titan on 5/31/2024 in #help
Not possible to add a new column to schema with drizzle migrate push (pg)
I'm adding a new column to my schema and running
drizzle-kit push
connecting to a postgres db
It never adds the new column. However if the new column contains a foreign key constraint it will attempt to add that, but will of course fail because the column hasn't been created.
This has never worked in the few months I've been using drizzle kit, perhaps I'm missunderstanding the purpose of push
? Does it not handle column level modificatons only new tables?1 replies
DTDrizzle Team
•Created by Titan on 4/26/2024 in #help
Return type is only "with" types, ignores "columns" types
Not sure if I'm using it wrong but the return type of a relational query is just the columns from the "with" clause, and doesn't merge with the "columns" object like I'd expect
3 replies
DTDrizzle Team
•Created by Titan on 4/8/2024 in #help
Insert returning api to match select columns
8 replies
DTDrizzle Team
•Created by Titan on 2/28/2024 in #help
Type for schema when creating db client
I get the following typescript error whenever I try to include
{ schema }
into my db creation:
```
Type 'LibSQLDatabase<typeof import("server/database/schema")>' is not assignable to type 'BetterSQLite3Database | LibSQLDatabase<Record<string, never>> | null'.
Type 'LibSQLDatabase<typeof import("server/database/schema")>' is not assignable to type 'LibSQLDatabase<Record<string, never>>'.
The types of '.schema' are incompatible between these types.
Type 'ExtractTablesWithRelations<typeof import("server/database/schema")> | undefined' is not assignable to type 'ExtractTablesWithRelations<Record<string, never>> | undefined'.
Type 'ExtractTablesWithRelations<typeof import("server/database/schema")>' is not assignable to type 'ExtractTablesWithRelations<Record<string, never>>'.
Property 'todos' is incompatible with index signature.
Type '{ tsName: "todos"; dbName: "todos"; columns: { id: SQLiteColumn<{ name: "id"; tableName: "todos"; dataType: "number"; columnType: "SQLiteInteger"; data: number; driverParam: number; notNull: true; hasDefault: true; enumValues: undefined; baseColumn: never; }, object>; userId: SQLiteColumn<...>; title: SQLiteColumn<....' is not assignable to type '{ tsName: string; dbName: never; columns: never; relations: Record<string, Relation<string>>; primaryKey: AnyColumn[]; }'.
Types of property 'dbName' are incompatible.
Type 'string' is not assignable to type 'never'.```10 replies