#14: add timestamp for inserted & updated
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { sql } from 'drizzle-orm';
|
||||
import * as t from 'drizzle-orm/sqlite-core';
|
||||
import { integer, real, sqliteTable as table, text } from 'drizzle-orm/sqlite-core';
|
||||
|
||||
@@ -20,6 +21,8 @@ export const Deck = table(
|
||||
lapses: integer('lapses'),
|
||||
isGraduated: integer('isGraduated'),
|
||||
user: text('user').notNull(),
|
||||
inserted: text().default(sql`(CURRENT_TIMESTAMP)`), // Neue Spalte
|
||||
updated: text().default(sql`(CURRENT_TIMESTAMP)`), // Neue Spalte
|
||||
},
|
||||
table => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user