We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For now in typings it union type of definition dbCredentials
{ dialect: Verify<Dialect, 'postgresql'>; dbCredentials: ({ host: string; port?: number; user?: string; password?: string; database: string; ssl?: boolean | 'require' | 'allow' | 'prefer' | 'verify-full' | ConnectionOptions; } & {}) | { url: string; }; }
I want to use both url & ssl keys
url
ssl
import type { Config } from "drizzle-kit" export default { schema: "./src/db/schema.ts", out: "./drizzle", dialect: "postgresql", dbCredentials: { url: process.env.DATABASE_URL as string } } satisfies Config
like in postgres client initialization
const client = postgres(process.env.DATABASE_URL as string, { ssl: "require", }); export const db = drizzle(client);
workaround is:
import type { Config } from "drizzle-kit"; const url = new URL(process.env.DATABASE_URL as string); if (process.env.USE_SSL) { url.searchParams.append("sslmode", "require"); url.searchParams.append("ssl", "true"); } export default { schema: "./src/db/schema.ts", out: "./drizzle", dialect: "postgresql", casing: "snake_case", dbCredentials: { url: url.toString(), }, } satisfies Config;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature hasn't been suggested before.
Describe the enhancement you want to request
For now in typings it union type of definition dbCredentials
I want to use both
url
&ssl
keyslike in postgres client initialization
workaround is:
The text was updated successfully, but these errors were encountered: