drizzle-kit push -> dialog is undefined even if i have it in the config
This is the error:
my config looks like this:
I am using this versions: "drizzle-orm": "^0.32.1", "drizzle-kit": "^0.23.0",
Can anyone help me with that ? 😢
yarn run db:push
yarn run v1.22.21
$ drizzle-kit push --verbose
drizzle-kit: v0.23.0
drizzle-orm: v0.32.1
node_modules/drizzle-kit/bin.cjs:5186
const error2 = new ZodError(ctx.common.issues);
^
_ZodError: [
{
"expected": "'postgresql' | 'mysql' | 'sqlite'",
"received": "undefined",
"code": "invalid_type",
"path": [
"dialect"
],
"message": "Required"
}
]
at get error [as error] (/Users/dominik/Work/DDCompany/wedding-places/node_modules/drizzle-kit/bin.cjs:5186:28)
at _ZodObject.parse (/Users/dominik/Work/DDCompany/wedding-places/node_modules/drizzle-kit/bin.cjs:5266:22)
at preparePushConfig (/Users/dominik/Work/DDCompany/wedding-places/node_modules/drizzle-kit/bin.cjs:20374:33)
at _Command.<anonymous> (/Users/dominik/Work/DDCompany/wedding-places/node_modules/drizzle-kit/bin.cjs:131592:13) {
issues: [
{
expected: "'postgresql' | 'mysql' | 'sqlite'",
received: 'undefined',
code: 'invalid_type',
path: [ 'dialect' ],
message: 'Required'
}
],
addIssue: [Function (anonymous)],
addIssues: [Function (anonymous)],
errors: [
{
expected: "'postgresql' | 'mysql' | 'sqlite'",
received: 'undefined',
code: 'invalid_type',
path: [ 'dialect' ],
message: 'Required'
}
]
}
yarn run db:push
yarn run v1.22.21
$ drizzle-kit push --verbose
drizzle-kit: v0.23.0
drizzle-orm: v0.32.1
node_modules/drizzle-kit/bin.cjs:5186
const error2 = new ZodError(ctx.common.issues);
^
_ZodError: [
{
"expected": "'postgresql' | 'mysql' | 'sqlite'",
"received": "undefined",
"code": "invalid_type",
"path": [
"dialect"
],
"message": "Required"
}
]
at get error [as error] (/Users/dominik/Work/DDCompany/wedding-places/node_modules/drizzle-kit/bin.cjs:5186:28)
at _ZodObject.parse (/Users/dominik/Work/DDCompany/wedding-places/node_modules/drizzle-kit/bin.cjs:5266:22)
at preparePushConfig (/Users/dominik/Work/DDCompany/wedding-places/node_modules/drizzle-kit/bin.cjs:20374:33)
at _Command.<anonymous> (/Users/dominik/Work/DDCompany/wedding-places/node_modules/drizzle-kit/bin.cjs:131592:13) {
issues: [
{
expected: "'postgresql' | 'mysql' | 'sqlite'",
received: 'undefined',
code: 'invalid_type',
path: [ 'dialect' ],
message: 'Required'
}
],
addIssue: [Function (anonymous)],
addIssues: [Function (anonymous)],
errors: [
{
expected: "'postgresql' | 'mysql' | 'sqlite'",
received: 'undefined',
code: 'invalid_type',
path: [ 'dialect' ],
message: 'Required'
}
]
}
import { type Config, defineConfig } from "drizzle-kit";
import { env } from "@/env";
export default defineConfig({
dialect: "postgresql",
schema: "./src/server/db/schemas/index.ts",
out: "./src/server/db/migrations",
dbCredentials: {
url: env.DATABASE_URL,
},
tablesFilter: ["wedding-places_*"],
verbose: true,
strict: true,
}) satisfies Config;
import { type Config, defineConfig } from "drizzle-kit";
import { env } from "@/env";
export default defineConfig({
dialect: "postgresql",
schema: "./src/server/db/schemas/index.ts",
out: "./src/server/db/migrations",
dbCredentials: {
url: env.DATABASE_URL,
},
tablesFilter: ["wedding-places_*"],
verbose: true,
strict: true,
}) satisfies Config;
0 Replies