MySQL Timestamp shows Invalid Date

All my tables with timestamp columns show
null
. And when clicked on show Invalid Date. Below is my schema for bookmarks table. What am I doing wrong?

export const bookmarks = mysqlTable(
  'bookmarks',
  {
    userId: varchar('userId', { length: 255 }).references(() => user.id),
    episodeId: varchar('episodeId', { length: 50 }).references(() => episodes.id),
    createdOn: timestamp('createdOn').notNull().defaultNow(),
  },
  (b) => ({
    compoundKey: primaryKey({ columns: [b.userId, b.episodeId] }),
  })
)
image.png
Was this page helpful?