© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago
va3y_

db push when adding notNull column with default() value

I've added this column to my table:
fullfilled: boolean("fullfilled").default(false).notNull(),
fullfilled: boolean("fullfilled").default(false).notNull(),


But when running
drizzle-kit push:mysql
drizzle-kit push:mysql
I get this:
You're about to add not-null fullfilled column without default value, which contains 9 items
THIS ACTION WILL CAUSE DATA LOSS AND CANNOT BE REVERTED
You're about to add not-null fullfilled column without default value, which contains 9 items
THIS ACTION WILL CAUSE DATA LOSS AND CANNOT BE REVERTED


Is there a way to push this column without dropping table, it it has default? Is is a bug, or am I doing something wrong?
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Planetscale db:push has issues with default values
Drizzle TeamDTDrizzle Team / help
3y ago
Conditional NotNull Column?
Drizzle TeamDTDrizzle Team / help
16mo ago
TypeError unless column is notNull
Drizzle TeamDTDrizzle Team / help
13mo ago
adding a new table column with default value drops all table data without warning
Drizzle TeamDTDrizzle Team / help
2y ago