lettucebaran
lettucebaran
Explore posts from servers
DTDrizzle Team
Created by lettucebaran on 7/20/2024 in #help
Can't alter column from `.notNull()` to `allow null`
PARTIALLY SOLVED I created a new custom migration script. Steps:
add new column
copy data from current column to new column
drop current column
rename new column to current column
add new column
copy data from current column to new column
drop current column
rename new column to current column
4 replies
DTDrizzle Team
Created by lettucebaran on 7/20/2024 in #help
Can't alter column from `.notNull()` to `allow null`
when i try to disable foreign key constaint with PRAGMA foreign_keys = OFF;, then drizzle-kit throws an error: FOREIGN KEY constraint failed
4 replies
DTDrizzle Team
Created by lettucebaran on 7/20/2024 in #help
Can't alter column from `.notNull()` to `allow null`
i have lots of foreign key constraints, and they have ON DELETE CASCADE. At this point, I regret using an SQLite db
4 replies
DTDrizzle Team
Created by lettucebaran on 6/4/2024 in #help
Type error when inserting
thanks a lot!
7 replies
DTDrizzle Team
Created by lettucebaran on 6/4/2024 in #help
Type error when inserting
i typecasted all values to string, and overload 1 and 2 are both solved
7 replies
DTDrizzle Team
Created by lettucebaran on 6/4/2024 in #help
Type error when inserting
interesting
7 replies
DTDrizzle Team
Created by Russell on 2/4/2024 in #help
Issue when inserting
@Angelelz i posted a simplified version of this problem here (and default value is included), could we continue the discussion there please? https://discord.com/channels/1043890932593987624/1247493906627559495
9 replies
DTDrizzle Team
Created by lettucebaran on 6/4/2024 in #help
Type error when inserting
Error
No overload matches this call.
Overload 1 of 2, '(value: { userId?: string | SQL<unknown> | Placeholder<string, any> | undefined; firstName?: string | SQL<unknown> | Placeholder<string, any> | null | undefined; }): SQLiteInsertBase<...>', gave the following error.
Type 'FormDataEntryValue | undefined' is not assignable to type 'string | SQL<unknown> | Placeholder<string, any> | null | undefined'.
Type 'File' is not assignable to type 'string | SQL<unknown> | Placeholder<string, any> | null | undefined'.
Type 'File' is missing the following properties from type 'Placeholder<string, any>': protected, getSQL
Overload 2 of 2, '(values: { userId?: string | SQL<unknown> | Placeholder<string, any> | undefined; firstName?: string | SQL<unknown> | Placeholder<string, any> | null | undefined; }[]): SQLiteInsertBase<...>', gave the following error.
Object literal may only specify known properties, and 'userId' does not exist in type '{ userId?: string | SQL<unknown> | Placeholder<string, any> | undefined; firstName?: string | SQL<unknown> | Placeholder<string, any> | null | undefined; }[]'.ts(2769)
No overload matches this call.
Overload 1 of 2, '(value: { userId?: string | SQL<unknown> | Placeholder<string, any> | undefined; firstName?: string | SQL<unknown> | Placeholder<string, any> | null | undefined; }): SQLiteInsertBase<...>', gave the following error.
Type 'FormDataEntryValue | undefined' is not assignable to type 'string | SQL<unknown> | Placeholder<string, any> | null | undefined'.
Type 'File' is not assignable to type 'string | SQL<unknown> | Placeholder<string, any> | null | undefined'.
Type 'File' is missing the following properties from type 'Placeholder<string, any>': protected, getSQL
Overload 2 of 2, '(values: { userId?: string | SQL<unknown> | Placeholder<string, any> | undefined; firstName?: string | SQL<unknown> | Placeholder<string, any> | null | undefined; }[]): SQLiteInsertBase<...>', gave the following error.
Object literal may only specify known properties, and 'userId' does not exist in type '{ userId?: string | SQL<unknown> | Placeholder<string, any> | undefined; firstName?: string | SQL<unknown> | Placeholder<string, any> | null | undefined; }[]'.ts(2769)
Question
and 'userId' does not exist in type '{ userId?: string | SQL<unknown> | Placeholder<string, any> | undefined; firstName?: string | SQL<unknown> | Placeholder<string, any> | null | undefined; }[]'.ts(2769)
I already pass userId when inserting, so why do I get this error?
7 replies
DTDrizzle Team
Created by Russell on 2/4/2024 in #help
Issue when inserting
@Angelelz I don't understand why userId: "d", line in planData solves the issue because OP is passing a value to userId column. Could you elaborate please?
9 replies
DTDrizzle Team
Created by Russell on 2/4/2024 in #help
Issue when inserting
@Russell what is your updated/fixed code?
9 replies
DTDrizzle Team
Created by lettucebaran on 5/20/2024 in #help
`drizzle-kit studio` is unable to launch D1 db (prod, remote)
the issue is fixed with drizzle-kit v0.21.3, THANK YOU! ❤️
2 replies