mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-02-25 20:35:10 +00:00
refactor: update database type declaration to use a centralized Database type for improved clarity and consistency
This commit is contained in:
@@ -7,11 +7,13 @@ import * as schema from "./schema";
|
||||
export { and, eq };
|
||||
export * from "./schema";
|
||||
|
||||
type Database = PostgresJsDatabase<typeof schema>;
|
||||
|
||||
declare global {
|
||||
var db: PostgresJsDatabase<typeof schema> | undefined;
|
||||
var db: Database | undefined;
|
||||
}
|
||||
|
||||
export let db: PostgresJsDatabase<typeof schema>;
|
||||
export let db: Database;
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
db = drizzle(postgres(dbUrl), {
|
||||
schema,
|
||||
|
||||
Reference in New Issue
Block a user