Kysely 및 PostgreSQL 도입 (WiP)

This commit is contained in:
static
2025-01-20 10:56:58 +09:00
parent 0002b4e5f2
commit 63eacbb1b3
10 changed files with 399 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
import type { Generated } from "kysely";
export const user = sqliteTable("user", {
id: integer("id").primaryKey({ autoIncrement: true }),
@@ -6,3 +7,16 @@ export const user = sqliteTable("user", {
password: text("password").notNull(),
nickname: text("nickname").notNull(),
});
interface UserTable {
id: Generated<number>;
email: string;
nickname: string;
password: string;
}
declare module "./index" {
interface Database {
user: UserTable;
}
}