const caString = fs.readFileSync("xxx.crt").toString();// URL encode the certificateconst caStringEncoded = encodeURIComponent(caString);// Construct the database URL with SSL parametersconst dbUrl = new URL(env.DB_URL!);dbUrl.searchParams.append("sslmode", "require");dbUrl.searchParams.append("sslrootcert", caStringEncoded);export default defineConfig({ dialect: "postgresql", out: "./drizzle", schema: "./db/schema/*", dbCredentials: { url: dbUrl.toString(), }, schemaFilter: ["public"],});
...const connectionString = process.env.DB_URL!;const client = postgres(connectionString, { ssl: { rejectUnauthorized: true, ca: fs.readFileSync("xxx").toString(), },});...