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] }),
})
)
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] }),
})
)
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server