mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat: proper timeout and order of operations
This commit is contained in:
@@ -2,10 +2,10 @@ import "dotenv/config";
|
||||
import { Database } from "bun:sqlite";
|
||||
import { drizzle } from "drizzle-orm/bun-sqlite";
|
||||
import { migrate } from "drizzle-orm/bun-sqlite/migrator";
|
||||
import { config } from "../core/config";
|
||||
import * as schema from "./schema";
|
||||
import { DATABASE_URL } from "../core/constants";
|
||||
|
||||
const sqlite = new Database(config.dbFileName);
|
||||
const sqlite = new Database(DATABASE_URL);
|
||||
|
||||
export const db = drizzle({ client: sqlite, schema });
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ export const volumesTable = sqliteTable("volumes_table", {
|
||||
createdAt: int("created_at", { mode: "timestamp" }).notNull().default(sql`(unixepoch())`),
|
||||
updatedAt: int("updated_at", { mode: "timestamp" }).notNull().default(sql`(unixepoch())`),
|
||||
config: text("config", { mode: "json" }).$type<typeof volumeConfigSchema.inferOut>().notNull(),
|
||||
autoRemount: int("auto_remount").notNull().default(1),
|
||||
});
|
||||
|
||||
export type Volume = typeof volumesTable.$inferSelect;
|
||||
|
||||
Reference in New Issue
Block a user