all repos — stealth-developers @ f93551c2f70938fc10d0a5c77b6e42b4e92c0073

pkgs/bot/src/database/schema/sessions.ts (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
import { sql } from "drizzle-orm";

export const sessions = sqliteTable("sessions", {
	id: text("id").primaryKey(),
	userId: text("user_id").notNull(),
	username: text("username").notNull(),
	createdAt: integer("created_at", { mode: "timestamp" })
		.default(sql`(unixepoch())`)
		.notNull(),
});