레포지토리 레이어의 코드를 Kysely 기반으로 모두 마이그레이션 (WiP)

This commit is contained in:
static
2025-01-20 16:05:35 +09:00
parent 63eacbb1b3
commit a3c169f706
17 changed files with 724 additions and 456 deletions

View File

@@ -1,5 +1,5 @@
import { sqliteTable, text, integer, foreignKey } from "drizzle-orm/sqlite-core";
import type { ColumnType, Generated, JSONColumnType } from "kysely";
import type { ColumnType, Generated } from "kysely";
import { hsk } from "./hsk";
import { mek } from "./mek";
import { user } from "./user";
@@ -88,10 +88,10 @@ export const fileLog = sqliteTable("file_log", {
newName: ciphertext("new_name"),
});
type Ciphertext = JSONColumnType<{
export type Ciphertext = {
ciphertext: string; // Base64
iv: string; // Base64
}>;
};
interface DirectoryTable {
id: Generated<number>;