DT
Drizzle Team•12mo ago
JWW

push command didn't update schema to my database (truso)

Hi everyone, I just add a new column called "deadline" to my schema (pic 1 and config file in pic2), and then run push command:
npx drizzle-kit push:sqlite
No config path provided, using default path
Reading config file '/Users/wujianwei/Code/Web Development 💻/tasks.org/drizzle.config.ts'
drizzle-kit: v0.20.6
drizzle-orm: v0.29.1

[✓] Changes applied
npx drizzle-kit push:sqlite
No config path provided, using default path
Reading config file '/Users/wujianwei/Code/Web Development 💻/tasks.org/drizzle.config.ts'
drizzle-kit: v0.20.6
drizzle-orm: v0.29.1

[✓] Changes applied
It saied change applied but I don't get change in my turso database (pic 3, still missing deadline column), what's going on there?
No description
No description
No description
2 Replies
Jsx
Jsx•12mo ago
you have existing data so one thing you can do is to have a default value for deadline like null or empty string. You're providing the constraint that it should be not null but also not providing the default value. I don't know why didn't it throw any error as you mentioned
JWW
JWWOP•12mo ago
Ok I try to give deadline a default value but then error happened: SQLite error: table tasks has 9 columns but 8 values were supplied
Want results from more Discord servers?
Add your server