-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
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
[BUG] check throws a zod validation error #414
Comments
TLDR: The check command currently ignores the selected dialect and instead runs for all dialects. Local solve is to comment out the dialects you're not using in the This issue has been reported on the drizzle-orm repo aswell under drizzle-orm#2284. Seems like just a dev test that was forgotten or that in the past the checkHandlers themselves quit if it wasn't the correct dialect. Should be a rather simple fix just copying what's being done in the up command.
var checkCommand = new import_commander.Command("check").option("--config <config>", `Drizzle config file path`).option("--dialect <dialect>", "Database dialect").option("--out <out>", `Output folder`).action(async (options) => {
await printVersions();
await assertOrmCoreVersion();
const params = cliConfigCheck.parse(options);
const { out, dialect: dialect7 } = await assertOutFolder(params);
checkHandler(out, "postgresql");
checkHandler(out, "sqlite");
checkHandler(out, "mysql");
console.log("Everything's fine \u{1F436}\u{1F525}");
});
var upCommand = new import_commander.Command("up").option("--config <config>", `Drizzle config file path`).option("--dialect <dialect>", "Database dialect").option("--out <out>", `Output folder`).action(async (options) => {
await printVersions();
await assertOrmCoreVersion();
const params = cliConfigCheck.parse(options);
const { out, dialect: dialect7 } = await assertOutFolder(params);
await assertPackages("drizzle-orm");
if (dialect7 === "postgresql") {
upPgHandler(out);
}
if (dialect7 === "mysql") {
upMysqlHandler(out);
}
if (dialect7 === "sqlite") {
upSqliteHandler(out);
}
}); |
drizzle-kit check
throws a zod validation error.The text was updated successfully, but these errors were encountered: