2024-04-13 14:20:12 +02:00
|
|
|
import type { Config } from "drizzle-kit";
|
2025-02-15 02:47:29 +01:00
|
|
|
import { config } from "~/config.ts";
|
2024-04-11 13:39:07 +02:00
|
|
|
|
2025-01-28 17:43:43 +01:00
|
|
|
/**
|
|
|
|
|
* Drizzle can't properly resolve imports with top-level await, so uncomment
|
|
|
|
|
* this line when generating migrations.
|
|
|
|
|
*/
|
2024-04-11 13:39:07 +02:00
|
|
|
export default {
|
2024-05-13 04:09:57 +02:00
|
|
|
dialect: "postgresql",
|
2024-06-13 01:10:40 +02:00
|
|
|
out: "./drizzle/migrations",
|
2024-04-11 13:39:07 +02:00
|
|
|
schema: "./drizzle/schema.ts",
|
|
|
|
|
dbCredentials: {
|
2025-01-28 17:43:43 +01:00
|
|
|
/* host: "localhost",
|
2024-04-16 02:40:40 +02:00
|
|
|
port: 40000,
|
|
|
|
|
user: "lysand",
|
|
|
|
|
password: "lysand",
|
2025-01-28 17:43:43 +01:00
|
|
|
database: "lysand", */
|
2025-02-15 02:47:29 +01:00
|
|
|
host: config.postgres.host,
|
|
|
|
|
port: config.postgres.port,
|
|
|
|
|
user: config.postgres.username,
|
|
|
|
|
password: config.postgres.password,
|
|
|
|
|
database: config.postgres.database,
|
2024-04-14 03:26:19 +02:00
|
|
|
},
|
2024-04-11 13:39:07 +02:00
|
|
|
// Print all statements
|
|
|
|
|
verbose: true,
|
|
|
|
|
// Always ask for confirmation
|
|
|
|
|
strict: true,
|
|
|
|
|
} satisfies Config;
|