© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
32 replies
focused_morning

Invalid default value for 'updatedAt'

Running into this issue, oddly enough this once worked and now breaks.

Error: target: americana-db.-.primary: vttablet: rpc error: code = InvalidArgument desc = Invalid default value for 'updatedAt' (errno 1067) (sqlstate 42000) (CallerID: planetscale-admin): Sql: "alter table InventoryItem modify column createdAt datetime(3) not null default (current_timestamp(3))", BindVars: {REDACTED}
    at PromiseConnection.query (/Users/robmartin/Projects/americana-neue/node_modules/.pnpm/drizzle-kit@0.19.2/node_modules/drizzle-kit/index.cjs:34122:26)
    at Command.<anonymous> (/Users/robmartin/Projects/americana-neue/node_modules/.pnpm/drizzle-kit@0.19.2/node_modules/drizzle-kit/index.cjs:51859:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ER_INVALID_DEFAULT',
  errno: 1067,
  sql: 'ALTER TABLE `InventoryItem` MODIFY COLUMN `createdAt` datetime(3) NOT NULL DEFAULT (CURRENT_TIMESTAMP(3));',
  sqlState: '42000',
  sqlMessage: `target: americana-db.-.primary: vttablet: rpc error: code = InvalidArgument desc = Invalid default value for 'updatedAt' (errno 1067) (sqlstate 42000) (CallerID: planetscale-admin): Sql: "alter table InventoryItem modify column createdAt datetime(3) not null default (current_timestamp(3))", BindVars: {REDACTED}`
Error: target: americana-db.-.primary: vttablet: rpc error: code = InvalidArgument desc = Invalid default value for 'updatedAt' (errno 1067) (sqlstate 42000) (CallerID: planetscale-admin): Sql: "alter table InventoryItem modify column createdAt datetime(3) not null default (current_timestamp(3))", BindVars: {REDACTED}
    at PromiseConnection.query (/Users/robmartin/Projects/americana-neue/node_modules/.pnpm/drizzle-kit@0.19.2/node_modules/drizzle-kit/index.cjs:34122:26)
    at Command.<anonymous> (/Users/robmartin/Projects/americana-neue/node_modules/.pnpm/drizzle-kit@0.19.2/node_modules/drizzle-kit/index.cjs:51859:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ER_INVALID_DEFAULT',
  errno: 1067,
  sql: 'ALTER TABLE `InventoryItem` MODIFY COLUMN `createdAt` datetime(3) NOT NULL DEFAULT (CURRENT_TIMESTAMP(3));',
  sqlState: '42000',
  sqlMessage: `target: americana-db.-.primary: vttablet: rpc error: code = InvalidArgument desc = Invalid default value for 'updatedAt' (errno 1067) (sqlstate 42000) (CallerID: planetscale-admin): Sql: "alter table InventoryItem modify column createdAt datetime(3) not null default (current_timestamp(3))", BindVars: {REDACTED}`
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

Invalid default value for timestamp
Drizzle TeamDTDrizzle Team / help
3y ago
Invalid default value when using defaultNow()
Drizzle TeamDTDrizzle Team / help
3y ago
Invalid Input Value for Enum
Drizzle TeamDTDrizzle Team / help
3y ago
Invalid input value for enum
Drizzle TeamDTDrizzle Team / help
3y ago