Closed jeremiedubuis closed 1 year ago
Hi, first of all thanks for the great work on drizzle-orm and drizzle-kit. I think I have spotted an error int he Config type exported for drizzle-kit.
Using a drizzle.config.ts file on mysql21 project and seeing the following type:
export type Config = { out?: string | undefined; breakpoints?: boolean | undefined; tablesFilter?: string | string[] | undefined; schema?: string | string[]; verbose?: boolean | undefined; strict?: boolean | undefined; } & { introspect?: { casing: "camel" | "preserve"; }; } & ({ driver: "turso"; dbCredentials: { url: string; authToken?: string; }; } | { driver: "better-sqlite"; dbCredentials: { url: string; }; } | { driver: "libsql"; dbCredentials: { url: string; }; } | { driver: "pg"; dbCredentials: { host: string; port?: number; user?: string; password?: string; database: string; ssl?: boolean; }; } | { driver: "pg"; dbCredentials: { connectionString: string; }; } | { driver: "mysql2"; dbCredentials: { host: string; port?: number; user?: string; password?: string; database: string; connectionString: string; }; } | { driver: "mysql2"; dbCredentials: { connectionString: string; }; } | {});
For the mysql2 driver:
{ driver: "mysql2"; dbCredentials: { host: string; port?: number; user?: string; password?: string; database: string; connectionString: string; }; } | { driver: "mysql2"; dbCredentials: { connectionString: string; }; }
It seems to me the connectionString should not be present for the first type.
fixed in drizzle-kit@cjs, will be in latest today
drizzle-kit@cjs
Fixed in drizzle-kit@0.19.2
drizzle-kit@0.19.2
Hi, first of all thanks for the great work on drizzle-orm and drizzle-kit. I think I have spotted an error int he Config type exported for drizzle-kit.
Using a drizzle.config.ts file on mysql21 project and seeing the following type:
For the mysql2 driver:
It seems to me the connectionString should not be present for the first type.